Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-cbus server.js run on boot #5

Open
Chickenparmie opened this issue Sep 7, 2017 · 3 comments
Open

node-cbus server.js run on boot #5

Chickenparmie opened this issue Sep 7, 2017 · 3 comments

Comments

@Chickenparmie
Copy link

I have everything working great.
every time i close the SSH session the server.js stops working
i would just like to get the server.js to run on boot on my raspberry pi
I have tried lots of different ways but i cant figure it out
any help would be appreciated

@NovaGL
Copy link

NovaGL commented Oct 13, 2017

I just use PM2 and it keeps it open in the background

@Chickenparmie
Copy link
Author

Chickenparmie commented Oct 13, 2017 via email

@ElphaX
Copy link

ElphaX commented Jan 15, 2018

Add this path to your /etc/rc.local file by doing 'sudo /etc/rc.local' and add the following line
su pi -c 'node [PATH/TO/SERVER.JS] < /dev/null &'
but replace with your path. For example, if your js file is in the default home pi directory your line would be
su pi -c 'node /home/pi/node-cbus/server.js < /dev/null &'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants