Local build and run nestjs application

Update nx

The current version of nx contains bugs, need update it

npx nx migrate @nrwl/workspace

endy@endy-virtual-machine:~/Projects/current/kaufman-bot$ npx nx migrate @nrwl/workspace
Fetching meta data about packages.
It may take a …


This content originally appeared on DEV Community and was authored by ILshat Khamitov

Update nx

The current version of nx contains bugs, need update it

npx nx migrate @nrwl/workspace

endy@endy-virtual-machine:~/Projects/current/kaufman-bot$ npx nx migrate @nrwl/workspace
Fetching meta data about packages.
It may take a few minutes.
Fetching @nrwl/workspace@latest
Fetching prettier@^2.5.1
Fetching @nrwl/cli@13.8.1
Fetching @nrwl/eslint-plugin-nx@13.8.1
Fetching @nrwl/jest@13.8.1
Fetching @nrwl/linter@13.8.1
Fetching @nrwl/nest@13.8.1
Fetching @nrwl/node@13.8.1
Fetching @nrwl/tao@13.8.1
Fetching @nrwl/workspace@13.8.1
Fetching prettier@2.5.1

>  NX  The migrate command has run successfully.

- package.json has been updated
- migrations.json has been generated

>  NX  Next steps:

- Make sure package.json changes make sense and then run 'npm install'
- Run 'nx migrate --run-migrations'
- To learn more go to https://nx.dev/using-nx/updating-nx
- You may run "nx connect-to-nx-cloud" to get faster builds, GitHub integration, and more. Check out https://nx.app

npm i

endy@endy-virtual-machine:~/Projects/current/kaufman-bot$ npm i

added 1 package, removed 103 packages, changed 7 packages, and audited 746 packages in 4s

76 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

npm run nx -- migrate --run-migrations

endy@endy-virtual-machine:~/Projects/current/kaufman-bot$ npm run nx -- migrate --run-migrations

> kaufman-bot@0.0.0 nx
> nx "migrate" "--run-migrations"


>  NX  Running 'npm install' to make sure necessary packages are installed


up to date, audited 746 packages in 3s

76 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

>  NX  Running migrations from 'migrations.json'

Running migration set-default-base-if-not-set
Successfully finished set-default-base-if-not-set
---------------------------------------------------------
Running migration 13-0-0-config-locations
Successfully finished 13-0-0-config-locations
---------------------------------------------------------
Running migration set-parallel-default
Successfully finished set-parallel-default
---------------------------------------------------------
Running migration 13-3-0-tsc-location
Successfully finished 13-3-0-tsc-location
---------------------------------------------------------
Running migration 13-6-0-remove-old-task-runner-options
Successfully finished 13-6-0-remove-old-task-runner-options
---------------------------------------------------------

>  NX  Successfully finished running migrations from 'migrations.json'

Build sources

npm run nx -- build server

endy@endy-virtual-machine:~/Projects/current/kaufman-bot$ npm run nx -- build server

> kaufman-bot@0.0.0 nx
> nx "build" "server"


> nx run server:build

chunk (runtime: main) main.js (main) 2.76 KiB [entry] [rendered]
webpack compiled successfully (ba0f882f8a8c0d5f)

 ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Successfully ran target build for project server (4s)

Start built application

node ./dist/apps/server/main.js

endy@endy-virtual-machine:~/Projects/current/kaufman-bot$ node ./dist/apps/server/main.js
[Nest] 1439017  - 02/12/2022, 9:14:11 PM     LOG [NestFactory] Starting Nest application...
[Nest] 1439017  - 02/12/2022, 9:14:11 PM     LOG [InstanceLoader] AppModule dependencies initialized +31ms
[Nest] 1439017  - 02/12/2022, 9:14:11 PM     LOG [RoutesResolver] AppController {/api}: +6ms
[Nest] 1439017  - 02/12/2022, 9:14:11 PM     LOG [RouterExplorer] Mapped {/api, GET} route +3ms
[Nest] 1439017  - 02/12/2022, 9:14:11 PM     LOG [NestApplication] Nest application successfully started +3ms
[Nest] 1439017  - 02/12/2022, 9:14:11 PM     LOG 🚀 Application is running on: http://localhost:3333/api

Check applications

curl http://localhost:3333/api

endy@endy-virtual-machine:~/Projects/current/kaufman-bot$ curl http://localhost:3333/api
{"message":"Welcome to server!"}endy@endy-virtual-machine:~/Projects/current/kaufman-bot$


This content originally appeared on DEV Community and was authored by ILshat Khamitov


Print Share Comment Cite Upload Translate Updates
APA

ILshat Khamitov | Sciencx (2022-02-12T18:07:17+00:00) Local build and run nestjs application. Retrieved from https://www.scien.cx/2022/02/12/local-build-and-run-nestjs-application/

MLA
" » Local build and run nestjs application." ILshat Khamitov | Sciencx - Saturday February 12, 2022, https://www.scien.cx/2022/02/12/local-build-and-run-nestjs-application/
HARVARD
ILshat Khamitov | Sciencx Saturday February 12, 2022 » Local build and run nestjs application., viewed ,<https://www.scien.cx/2022/02/12/local-build-and-run-nestjs-application/>
VANCOUVER
ILshat Khamitov | Sciencx - » Local build and run nestjs application. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/12/local-build-and-run-nestjs-application/
CHICAGO
" » Local build and run nestjs application." ILshat Khamitov | Sciencx - Accessed . https://www.scien.cx/2022/02/12/local-build-and-run-nestjs-application/
IEEE
" » Local build and run nestjs application." ILshat Khamitov | Sciencx [Online]. Available: https://www.scien.cx/2022/02/12/local-build-and-run-nestjs-application/. [Accessed: ]
rf:citation
» Local build and run nestjs application | ILshat Khamitov | Sciencx | https://www.scien.cx/2022/02/12/local-build-and-run-nestjs-application/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.