Host on Deno Deploy
Deno Deploy runs the app as WebAssembly on Deno's edge.
Build
rustup target add wasm32-unknown-unknown # once
wisp build --target deno # dist/deno (--out <folder>)
In Deno Deploy's CI a plain wisp build picks the target from DENO_DEPLOYMENT_ID.
Deploy
From dist/deno:
deployctl deploy --entrypoint main.ts
deno run -A main.ts # try it locally
wisp deploy init deno writes a GitHub Actions workflow that builds and deploys on push to main with denoland/deployctl. It reads no secrets: it uses GitHub's OIDC token. Edit project: <name> in it to your project.
Environment
WISP_SECRETas a project environment variable in Deno Deploy, for an app that signs cookies.- Read other values with
wisp::env("KEY");std::env::varsees nothing and there is no.env. WISP_STORE=deno-kvand the rest: Environment variables.
Limits
- Deno Deploy has no sockets, so it always serves with
Deno.serve. (Locallydeno run -A main.tsreads raw sockets, andWISP_NODE_HTTP=1selectsDeno.serve.) - WebSockets answer 501; use
Response::events(SSE).Response::streamandResponse::eventsare live. - No threads or files: use
wisp::spawnandwisp::sleep. See What works on the edge. wisp::channel,wisp::everyandRateLimitare not in the edge build, and there is no cron trigger to write: the build says so and stops when the app useswisp::cron.
Files and Data
dist/denohas no separate static folder: the app answers forstatic/itself.Table::savedandRestare per-instance memory unlessWISP_STORE=deno-kv(ordeno-kv:<path>for a file or URL) is set. See Saved tables.
More
Edge and serverless targets, Deploying.
Is This Page Useful?