Raspberry pi在启动时加载应用程序/Raspberry pi cargar应用程序已启动 [英] Raspberry pi load app at startup / Raspberry pi cargar app al iniciar

查看:59
本文介绍了Raspberry pi在启动时加载应用程序/Raspberry pi cargar应用程序已启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目在/home/pi/app中以npm start开头

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)

**** Español

Mi proyecto esta zh/home/pi/appArranca laaplicacióncon npm开始

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

主要原理是什么?

服务=>它不起作用


[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

推荐答案

考虑使用rc.local文件

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

这篇关于Raspberry pi在启动时加载应用程序/Raspberry pi cargar应用程序已启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆