Nest-cli: [FEATURE] - use ts-node instead build & start

Created on 23 Nov 2017  路  8Comments  路  Source: nestjs/nest-cli

what about use ts-node instead npm run build && npm run start on "serve" script?
It's more efficient and speedy.

question

All 8 comments

this is my serve script:

"serve": "nodemon --exec ts-node -- ./src/server.ts",

you should also check the ts-node-dev for live reload feature, it works grate for me, it's insanely fast, compiles only changed files, and uses unchanged from cache, just like webpack do

my serve script example:
"serve": "ts-node-dev --fast --respawn ./src/server.ts"

nodemon use ts-node . This is a standard, well tested and full working solution.
ts-node-dev is something new.. it's not related to ts-node.

ok, i'll try nodemon with ts-node to see how it compares to ts-node-dev

ts-node-dev is also using ts-node inside, just adds the watch functionality, so far works good, so may be someone else, also wants to try it out.

I try it and my project crash with ts-node-dev. Work fine with ts-node and nodemon and tsc.
It 鈥榮 not good

Hey guys !
serve command already use nodemon and ts-node.
I think we can close the issue

@ThomRick this command is not for the cli but for the app generated

upgrade to 4.0.0 or 5.0.0 depends on the Nestjs major version you want to use.
Use the typescript-starter repo with ts-node
build and serve will next features

Was this page helpful?
0 / 5 - 0 ratings