The "Hello from Svelte!π" application is just a starter to show a minimalist Svelte.js app.
Clone this repository:
https://github.com/ProofOfConceptFactory/poc-svelte
Go on the project root folder:
cd poc-svelte/
Install certificate to use HTTPS:
mkcert -install
mkdir -p certs
mkcert -key-file certs/poc-svelte.key.pem -cert-file certs/poc-svelte.crt.pem localhost
Execute this command to launch docker container in dev:
docker compose -f docker/compose.yaml up -d --build
Install JavaScript dependencies:
docker compose -f docker/compose.yaml exec node pnpm install
There's no need to configure anything before running the application. There are 2 different ways of running this application depending on your needs:
Option 1. Run the application in dev mode
Run this command:
docker compose -f docker/compose.yaml exec node pnpm run dev
Then access the application in your browser at the given URL (https://localhost:8000/# by default).
Option 2. Run the application in prod mode
docker compose -f docker/compose.yaml exec node pnpm run build
You now have your fresh JavaScript files for production π. You can check everything is OK by opening the https://localhost:8000/dist/index.html link and navigate on your application.
Install Cypress dependencies:
docker compose -f docker/compose.yaml exec node pnpm cypress install
Execute this command to run tests:
docker compose -f docker/compose.yaml exec node pnpm cypress run
This application is deployed on GitHub Pages. Everything is configured and managed automatically by GitHub Actions. You can check the workflow file at .github/workflows/github-pages.yaml.