Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting Loopback with nodemon

I would like to restart automatically my local strongloop/loopback app when js & json are modified. I am testing with nodemon but the app is always restarting even if js or json are not modified.

Is there an alternative for solving this problem ?

Thanks, Christophe

like image 448
Christophe Avatar asked Nov 15 '25 09:11

Christophe


1 Answers

if you would like to run the project with nodemon just add dev command under the script json object and add additional config json inside of the package.json file.

"scripts": {
  ...
  "dev" : "nodemon src/index.ts",
  ...
},
"nodemonConfig": {
  "verbose": true,
  "watch": [ "src/" ],
  "ignore": [ "dist/*" ],
  "ext": "ts",
  "exec": "npm start"
},

and then run the project with command npm run dev.

like image 103
Amr Omar Avatar answered Nov 17 '25 10:11

Amr Omar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!