Everything you need to build a Svelte project, powered by sv.
If you're seeing this, you've probably already done this step. Congrats!
# create a new project
npx sv create my-appOnce you've installed dependencies with deno install, start a development server:
deno task dev
# or start the server and open the app in a new browser tab
deno task dev -- --openTo create a production version of your app:
deno task buildYou can preview the production build with deno task preview.
This project deploys to Cloudflare Workers using @sveltejs/adapter-cloudflare, which outputs a Worker to .svelte-kit/cloudflare/.
Copy .dev.vars.example to .dev.vars and fill in ANTHROPIC_API_KEY for local wrangler dev/wrangler deploy. In production, set it with:
deno run -A ./node_modules/.bin/wrangler secret put ANTHROPIC_API_KEYThen deploy with:
deno task deployCI (.gitlab-ci.yml) runs this on pushes to main, and needs a CLOUDFLARE_API_TOKEN CI/CD variable set in the project settings.