This is a Vue.js Static Site Quickstart for Nullstone. This is based off the official Vue.js Quick Start guide.
This quickstart is set up with:
- Vue.js 3
- Typescript
- Vue router for Single Page Application
- Create a static site. (Remember
app-name
for later) - Add a subdomain. (this will add a CDN capability)
- Provision
nullstone up --wait --block=<app-name> --env=<env-name>
- Build, push, and deploy
npm run build
nullstone launch --source=./dist --app=<app-name> --env=<env-name>
You can run this project locally inside Docker or using a dev server. The docker setup is configured to hot reload; you don't have to rebuild/restart the container when you change code.
NOTE: This setup requires configuring vite server to bind on 0.0.0.0
.
docker compose up
Visit http://localhost:3000.
npm run dev
Visit http://localhost:3000.
The app
in docker-compose.yml
is configured to automatically reload changes to code.
You do not need to rebuild/restart the app when making changes to code.
To make changes to dependencies, make changes to package.json
and restart your docker container.
npm install
happens automatically at the boot of the docker container to update dependencies.
docker compose restart app
This static site was generated following these steps.
npm init vue .
npm install
- Configure
package.json
to serve on0.0.0.0
(necessary for Docker setup)
"scripts": {
"dev": "vite --host=0.0.0.0",