saisilinus / node-express-mongoose-typescript-boilerplate

A boilerplate for making production-ready RESTful APIs using Node.js, TypeScript, Express, and Mongoose
MIT License
330 stars 92 forks source link

Hot reload when dev mode #12

Closed elontruong closed 2 years ago

elontruong commented 2 years ago

I think maybe use should add a package "concurrently" as devDependencies. And change dev script like this to achieve Hot Reload as dev script.

PS: your command "yarn compile:watch" maybe wrong when include "src".

`"dev": "concurrently \"yarn compile:watch\" \"yarn pre:dev\"",

"pre:dev": "cross-env NODE_ENV=development nodemon --experimental-modules --es-module-specifier-resolution=node dist/index.js",

"compile:watch": "tsc --build --watch",`

saisilinus commented 2 years ago

Let me work on this ASAP

saisilinus commented 2 years ago

PS: your command "yarn compile:watch" maybe wrong when include "src".

Could you please elaborate on this

saisilinus commented 2 years ago

PS: your command "yarn compile:watch" maybe wrong when include "src".

Could you please elaborate on this

OK. I got it

elontruong commented 2 years ago

PS: your command "yarn compile:watch" maybe wrong when include "src". Could you please elaborate on this

OK. I got it

Github remove my "\" character, dev script should look like this

Screen Shot 2022-04-26 at 21 53 37