0

I have a problem with a server that runs nodejs.

For some reason, I need to say in the terminal nodejs instead of node. I try to reinstall it many times, but It doesn't change it.

Now, this isn't a big problem but I need to run forever. And forever won't run.

Is there a way to call forever with nodejs?

Thanks

SaschaDeWaal
  • 149
  • 2
  • 15
  • Create a symlink, or perhaps install pm2 instead of forever. This may be a duplicate... – Clay Dec 11 '15 at 13:57
  • Duplicate of http://stackoverflow.com/questions/18130164/nodejs-vs-node-on-ubuntu-12-04 – Clay Dec 11 '15 at 14:01

2 Answers2

0

According to forever documentation. You can use -c flag to define the command to execute, which default to node.

So if you want to use nodejs instead. You could use forever -c nodejs start script.js

For this to work you need to create a symlink.

For exemple like this : ln -s /usr/local/bin/nodejs /usr/local/bin/node

severin.julien
  • 1,314
  • 15
  • 27
0

install forever as a global

npm install -g forever

and run forever with this command inside application folder as this

forever start server.js