What is your developer-dependent CMS actually costing you? Calculate your costs and get a full report
What is your developer-dependent CMS actually costing you? Calculate your costs and get a full report
Deployment
Deploy the Agility SvelteKit starter to Azure — Static Web Apps with the community adapter, or App Service with adapter-node, plus rebuilds on publish.
Legacy — SvelteKit docs are no longer actively maintained. The SvelteKit starter targets SvelteKit 2; SvelteKit 3 shipped in October 2026. See why we recommend Next.js and .NET. If you need SvelteKit, let us know.
Two good ways to run the SvelteKit starter on Azure: Static Web Apps (SWA) for a managed static + functions setup, or App Service running the Node build. Either way, remember the starter's config comes from $env/static/private, which is inlined at build time — the Agility variables must be present when npm run build runs.
SWA doesn't have an official SvelteKit adapter, so use the community adapter svelte-adapter-azure-swa:
npm i -D svelte-adapter-azure-swa
// svelte.config.js
import adapter from 'svelte-adapter-azure-swa';
export default { kit: { adapter: adapter() } };
app_location: "/" and api_location: "build/server" per the adapter's README (check its docs for the current values).env: on the build step — SWA's portal “application settings” apply at runtime, which is too late for build-time-inlined values:| Variable | Value |
|---|---|
AGILITY_GUID | Your instance GUID |
AGILITY_API_FETCH_KEY | Fetch (live) API key |
AGILITY_API_PREVIEW_KEY | Preview API key |
AGILITY_SITEMAP | e.g. website |
AGILITY_LOCALES | e.g. en-us |
Rebuild on publish: the site is prerendered, so point an Agility publish webhook at something that re-runs the workflow — the simplest is a small Azure Function or Logic App that calls GitHub's repository_dispatch API, with the workflow listening for that event.
Run SvelteKit as a Node server with the official Node adapter:
npm i -D @sveltejs/adapter-node@5
The starter uses SvelteKit 2.
@sveltejs/adapter-node6 and later require SvelteKit 3, so install version 5 until you upgrade the starter to SvelteKit 3.
// svelte.config.js
import adapter from '@sveltejs/adapter-node';
export default { kit: { adapter: adapter() } };
az webapp up.node build.App Service suits teams already standardized on Azure compute or needing server features SWA doesn't offer.
Preview mode note: the starter's preview toggle is for local dev; production serves published content.