I am currently struggling with building a script that starts my web-application.
I would like to use foreverjs as I already start my backend with it. My json-file, which will be executed by foreverjs looks like the following:
[
{
"uid": "my_backend",
"append": true,
"script": "app.js",
"sourceDir": "/path/to/backend/"
},
{
"uid": "my_frontend",
"append": true,
"script": "???",
"command": "gulp dist && gulp production"
"sourceDir": "/path/to/frontend/"
}
]
I am not quite sure what I should use in the frontend. I need to use gulp so I would assume I have to add it in 'command'. However, my script would need to be empty, which is not allowed from foreverjs. Any suggestion of how I can run gulp via foreverjs?
I solved it myself, using the following script for my init.d:
Basically using /path/to/forever start --workingDir 'mydir' /path/to/gulp [gulpTask] works.