https://github.com/cotyhamilton/deno-sveltekit
deno + sveltekit how to
https://github.com/cotyhamilton/deno-sveltekit
deno svelte sveltekit
Last synced: 11 months ago
JSON representation
deno + sveltekit how to
- Host: GitHub
- URL: https://github.com/cotyhamilton/deno-sveltekit
- Owner: cotyhamilton
- Created: 2024-08-31T00:48:47.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-18T04:58:34.000Z (about 1 year ago)
- Last Synced: 2025-04-18T17:49:43.036Z (about 1 year ago)
- Topics: deno, svelte, sveltekit
- Language: TypeScript
- Homepage: https://deno-sveltekit-example.deno.dev
- Size: 692 KB
- Stars: 45
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# deno sveltekit
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.
## create project
```bash
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`
```bash
cd my-app
deno install
```
## develop
Install dependencies
```bash
deno install
```
Run the dev server
```bash
deno task dev
```
## build
```bash
deno task build
```
Preview the production build
```bash
deno task preview
```
Run production server
```bash
deno run -REN build/index.js
```
## docker
There is a basic `Dockerfile` included in the repo.
```bash
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
```
## deploy
Create project on [deno deploy](https://dash.deno.com/projects) 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:
```bash
deno task build
cd build
deployctl deploy --project= --entrypoint=index.js
```
## live example
https://deno-sveltekit-example.deno.dev