Thursday 19 September 2019

Is there a way to run npm scripts with forever.json?

I am trying to use forever as it's shown in the documentation. I created a json file and added something like this[ { // App1 "uid": "app1", "script": "index.js", "sourceDir": "/home/myuser/app1" } ] And it works, I run it like so:forever start /home/myuser/app/forever/development.jsonBut, projects created through create-react-app don't have an entry point but they have npm start. So is there a way to run npm start in the above setup?In the terminal I could do this: forever start -c "npm start" /home/myuser/app1 but it be supper hand to be able to add all my apps into a json file (the first example).Is there a way to do it?

Submitted September 19, 2019 at 09:40AM by gate18

No comments:

Post a Comment