A
A
Alexander2017-09-14 01:11:16
Node.js
Alexander, 2017-09-14 01:11:16

How to run nodejs script on RaspberryPI boot?

We have a raspberry with installed packages for working with nodejs. There is a test.js script, located, for example, in the /home/nodejs folder, which needs to be run when the system boots. Normal run is nodejs test.js. And how to do the same automatically, preferably with the ability to work as a service - i.e. with the ability to stop-start-restart?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Gerasimov, 2017-09-14
@Omashu

pm2 to manage and set the OS settings to start at boot

P
planc, 2017-09-14
@planc

https://wiki.archlinux.org/index.php/Systemd_(%D0%...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question