0

I have to run a Node.js application while reboot in Raspberry Pi.The application uses WiFi and BLE on-board of Raspberry Pi.

I have tried out the below solutions:

1.Copied my Node.js application in the rc.local with full path.

cd path filename.js < /dev/null &

But it still didn't work.
Ref link :(How to run a script (Node.js) at startup)

Dmitry Grigoryev
  • 27,928
  • 6
  • 53
  • 144
MVA
  • 76
  • 1
  • 5

1 Answers1

0

I've had this issue as well. What I finally had to do was create a script that starts the node.js application, and call that from rc.local.

myscript.sh #!/bin/bash cd application path node application.js

Then in rc.local, call myscript.sh with the full path.