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-app
In the tools prompt select sveltekit-adapter and either node or static
For package manager select deno
cd my-app
deno install
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
There 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-app
Create project on deno deploy and link repo
Svelte will be automatically selected as the framework preset
Open advanced settings
deno installdeno task buildbuildindex.jsAlternatively, deploy from the command line:
deno task build
cd build
deployctl deploy --project=<project-name> --entrypoint=index.js