We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d44b42c commit ea98adfCopy full SHA for ea98adf
pi_plug/README.md
@@ -25,12 +25,22 @@
25
3. `npm install express`
26
4. `npm install rpio`
27
28
+## BOOT NODE AT STARTUP ##
29
+
30
+Reference:
31
+- https://rebeccamdeprey.com/blog/automatically-start-nodejs-applications-when-your-raspberry-pi-boots-up
32
33
+- https://pm2.keymetrics.io/docs/usage/startup/
34
35
+1. Install PM2 `npm install pm2 -g` (I omitted -g for permissionissues...)
36
+2. Run PM2 to start the app: `pm2 start app.js`
37
+3. Get startup command: `pm2 startup`
38
+4. Copy paste command and run it
39
+5. Save current config: `pm2 save`
40
41
42
## REFERENCE ##
43
44
- Model B Rev2 pin layout: https://pi4j.com/1.2/pins/model-b-rev2.html
45
46
- Using ground + pin 16 (8th from left)
-
-## TODO
--start node server on startup
0 commit comments