DEV Community

Discussion on: How To Make A Typescript + NodeJS Express Project with eslint, EJS and Restart On Typescript Server Changes

Collapse
 
brense profile image
Rense Bakker

For a typescript project highly prefer ts-node-dev over nodemon
With your current start script, if you make a change to the typescript code it will not recompile automatically, you can fix that with nodemon, but ts-node-dev has no need to recompile your code, it will just serve the changed typescript immediately which is obviously much faster.

Collapse
 
brense profile image
Rense Bakker

Actually I just noticed you're doing stuff double... because you are using ts-node in your nodemon config you dont need to tsc before running nodemon. ts-node is also much slower than ts-node-dev though and you dont need to have nodemon at all, you can just add a script like this: "start": "ts-node-dev src/app.ts" and thats all you need.

Collapse
 
nyctonio profile image
Ritesh Kumar

Thank you for your insights I will check this out for sure