问题
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