This project is a web application with a Svelte 5 frontend, designed to run in a Dockerized environment with Nginx as the web server in the production environment. The setup includes a dev-container to develop quickly without rebuilding the code.
Most important files
.
├── docker-compose.yml
├── frontend
│ ├── src/
│ │ ├── App.svelte
│ │ ├── assets/
│ │ │ └── svelte.svg
│ │ ├── lib
│ │ │ └── Counter.svelte
│ │ └─── pages/
│ └─── tests
│ └── demo.test.js
└── Readme.md
App.svelte
is the entry pointassets/
is for static files, eg imageslib/
is for the componentspages/
contains sub pages / stand-alone pages - only if needed git clone
cd webpage_template
docker compose up -d --build
docker compose up -d --build frontend_dev
lower_snake_case
for basically everything,
exceptions and details are on https://pep8.org/Helpful commands for the frontend-code:
# format the code
docker compose run frontend_dev npm run format
# lint the code
docker compose run frontend_dev npm run lint
# run tests
docker compose run frontend_dev npm run test