This repository root now contains a minimal SvelteKit project configured for Azure Static Web Apps with server-side capability.
- One page at
/(src/routes/+page.svelte) - One server endpoint at
/hello(src/routes/hello/+server.ts) - Azure SWA adapter configuration in svelte.config.js
- Ready-to-use SWA GitHub Actions workflow in .github/workflows/azure-static-web-apps.yml
npm install
npm run devnpm run buildThis creates:
- Static app artifacts in
build/static - SWA API (SSR function) in
build/server
Workflow uses these required settings for this adapter:
app_location: ./api_location: build/serveroutput_location: build/static
Add the deployment token as repository secret:
AZURE_STATIC_WEB_APPS_API_TOKEN
Then push to main to trigger deployment.