Everything you need to build a Svelte project, powered by sv.
If you're seeing this, you've probably already done this step. Congrats!
# create a new project
npx sv create my-appTo recreate this project with the same configuration:
# recreate this project
npx sv@0.16.6 create --template demo --no-types --add prettier eslint --install npm dashboardOnce you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --openTo create a production version of your app:
npm run buildYou can preview the production build with npm run preview.
To deploy your app, you may need to install an adapter for your target environment.
The app uses @sveltejs/adapter-node and ships with a Dockerfile and docker-compose.yml for running on your Synology DS224+ via Container Manager.
- Develop locally,
git pushto GitHub. - On the NAS:
git pullthe changes. - Rebuild and restart the container (below).
SSH into the NAS (or use the Container Manager terminal), then:
git clone git@github.com:consolecmnd/dashboard.git # first time only
cd dashboard
git pull # every update
docker compose up -d --buildThe site is served at http://<nas-ip>:3000.
- Open Container Manager → Project → Create.
- Name it
dashboard, set the path to the repo folder (/volume1/docker/dashboardor wherever you cloned it). - Point it at the
docker-compose.ymlin the repo (or paste its contents). - Select Build the image and click Create. Container Manager builds the image and starts the container.
If you prefer not to clone the repo onto the NAS:
docker build -t dashboard:latest .
docker stop dashboard && docker rm dashboard
docker run -d --name dashboard --restart unless-stopped -p 3000:3000 dashboard:latestcd dashboard && git pull && docker compose up -d --build