Definitely doable. Develop your Vue app on your computer (referred to as the development environment) and then host it on your raspberry pi (production environment). There are various methods to accomplish this, but essentially you just need to:
- Set up your raspberry pi as usual by installing the preferred OS
- Access the pi via SSH from your PC
- Install a web server such as Nginx or Apache for hosting the Vue app
- You can install Node and Git on the webserver using SSH. Then proceed to clone the app repository directly into the appropriate folder. With Node setup on the server, you can execute npm commands and build the Vue site with npm run build. Alternatively, you can transfer your build/dist folder to the server, although additional configuration may be required.
- Obtain a domain name and link it to the IP address of your raspberry pi ( is recommended)
Some helpful tutorials to refer to include:
- Setting up SSH on a raspberry pi
- Configuring Nginx or Apache on a raspberry pi
- Deploying a Vue app to a webserver (explore both Nginx and Apache). YouTube has useful videos on this topic
- Linking a domain name to your raspberry pi website
Note: It's crucial to bear in mind that exposing your webserver to the internet through your home network could potentially jeopardize your router security, allowing unauthorized access to your devices. Consider setting up a firewall to safeguard against this threat. Research this aspect further for more information.
Check out these valuable resources:
https://medium.com/@thesabareesh/host-your-own-website-on-a-raspberry-pi-3-e3c8fdb90f90