Raspberry pi load app at startup / Raspberry pi cargar app al iniciar

走远了吗. 提交于 2020-03-25 12:32:44

问题


My project is in /home/pi/app Starts with npm start

How can I get the app to start up when I start the operating system?

**** Español

Mi proyecto esta en /home/pi/app Arranca la aplicación con npm start

Cómo puedo hacer que la app se inicie al principio?

Service => it does not work


[Unit]
Description=appvi
After=netwwork-online.target

[Service]
WorkingDirectory=/home/pi/appvi
ExecStart=/usr/local/bin/npm start
Restart=always
StandardOuput=syslog
StandardError=syslog
SyslogIdentifier=notell
User=pi
Group=pi
Enviroment=NODE_ENV=production

[Install]
WantedBy=multi-user.target


回答1:


Consider using the rc.local file, https://www.raspberrypi.org/documentation/linux/usage/rc-local.md



来源:https://stackoverflow.com/questions/60762805/raspberry-pi-load-app-at-startup-raspberry-pi-cargar-app-al-iniciar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!