Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to start vue server on boot with raspberry pi?

I usually start the vue server with npm run serve, but i want to make it start itself at boot time of raspberry pi and i don’t know how to do it. I want it to be accessible from my local network.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Raspberry Pi runs as a UNIX machine, so you can use typical entrypoint mechanisms to start your server on boot.

I’d recommend editing your rc.local to run your npm run serve in your terminal:

sudo non /etc/rc.local

Add on a new line:

(cd /path/to/vueapp && npm run serve) &

The additional & at the end forks the process, don’t forget this.

then run sudo reboot and you should see your local server running on startup.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading