如何在启动时在Beaglebone上运行ReactJS应用程序?

时间:2018-07-01 19:21:25

标签: node.js reactjs beagleboneblack beagleboard autorun

我的主计算机正在运行Ubuntu 18,04,我在前端的 ReactJS ,后端的 NodeJS MySQL 上开发了一个应用程序beaglebone上的数据库。

有关我的BeagleBone的更多信息:

 root@beaglebone:~# uname -a
Linux beaglebone 3.8.13-bone71.1 #162 SMP Fri Oct 16 07:27:34 CST 2015 armv7l GNU/Linux

我想始终在 BeagleBone

上启动时运行我的应用程序

如何使脚本启动后立即运行?

1 个答案:

答案 0 :(得分:1)

简短答案:就像在运行Linux发行版的任何其他设备(包括PC或服务器)上一样。

一些快速指针:

  • Latest BeagleBone Images是基于Debian 9.4的
  • 除非确实需要使用HDMI(或LCD)输出并接受较低的性能,否则请使用“ IoT”图像。
  • Debian使用 systemd 来管理软件服务的自动启动和停止
  • 创建一个systemd service file来以所需用户(可能是“ debian”)的身份调用所需的进程(例如npm)。似乎有service-systemd
  • 这样的辅助工具
  • 重新加载systemd systemctl daemon-reload,使其了解新文件
  • 启用systemctl enable myfancy.service
  • Debian上的两种mySQL版本(mysql-servermariadb-server)都已带有systemd文件。