简体   繁体   中英

Trouble running forever on ubuntu

I am trying to install forever to run my nodeJS app. I used npm to install forever

npm install forever -g

now when I try to run my app using the following command, nothing happens (no error message)

forever server.js

when I check pidof forever, I get nothing. What could I be doing wring? The instructions seem fairly straight forward

I've found the solution to this problem. If you used apt-get to install node, it is mapped to nodejs, not node.

head to /usr/local/bin/ and edit forever

vim /usr/local/bin/forever

change this line

#!/usr/bin/env node

to

#!/usr/bin/env nodejs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM