This repo used to serve as a proof of concept and documentation for any custom
requirements for running sveltekit with deno. There are no longer any major
issues, and you may just follow the prompts of the sv cli to create a new
project.
deno run -A npm:sv@latest create my-appIn the tools prompt select sveltekit-adapter and either node or static
For package manager select deno
cd my-app
deno installInstall dependencies
deno installRun the dev server
deno task devdeno task buildPreview the production build
deno task previewRun production server
deno run -REN build/index.jsThere is a basic Dockerfile included in the repo.
docker build -t my-app .
docker run -p 3000:3000 my-app
# or for a custom port
docker run --env PORT=5001 -p 5001:5001 my-appCreate 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