This is my personal website. It is built using Astro and hosted on Azure Static Web Apps. Go and check it out at https://clowa.dev.
api/hosts the Azure Functions for the APIsswa/hosts the Frontend Code of the Website
To run the project locally, make sure you have Node.js and the Azure Static Web Apps CLI installed - or simply use the provided DevContainer.
For simpliciy you can use the provided Taskfile to run common tasks.
task init-devcontainer
- Sets up the project by setting up permissions and installing dependencies
- Should be run once after starting a new devcontainer or codespaces instance
Note
There are two main ways to run the project locally.
task run-devserver
- Provides live reloading of the swa when you save files
- Uses Astro's development server for fast iteration
- Limitation: API endpoints don't support live-reloading
- Best for: Frontend-only development
task run
- Builds a static version of the entire app
- Spins up both the web app AND function APIs together
- API endpoints work correctly
- Limitation: No live reloading - requires rebuilding to see changes
- Best for: Testing the complete application including API functionality
Tip
Choose task run-devserver for rapid frontend development, or task run when you need to test API endpoints and the full integrated experience.