deno run -A npm:sv@latest create my-app
cd my-app
deno install
deno fmt
deno add --dev npm:@types/deno npm:@sveltejs/adapter-node
deno remove @sveltejs/adapter-auto
Update svelte.config.js
- import adapter from "@sveltejs/adapter-auto";
+ import adapter from "@sveltejs/adapter-node";
Install dependencies
deno install
Run the dev server
deno task dev
deno task build
Preview the production build
deno task preview
Run production server
deno run -REN build/index.js
Create project on deno deploy and link repo
Svelte will be automatically selected as the framework preset
Open advanced settings
- Set "Install Step" to
deno install
- Set "Build Step" to
deno task build
- Set "Root directory" to
build
- Set "Entrypoint" to
index.js
Alternatively, deploy from the command line:
deno task build
cd build
deployctl deploy --project=<project-name> --entrypoint=index.js