Skip to content

Deno

BuildTarget.deno compiles your Spry application to a JavaScript file that runs under deno run.

Config

dart
import 'package:spry/config.dart';

void main() {
  defineSpryConfig(host: '127.0.0.1', port: 4150, target: BuildTarget.deno);
}

Build output

text
.spry/
  src/
    main.dart       ← compile input
  deno/
    index.js        ← compiled output, run with deno

Build and run

bash
dart run spry build
deno run --allow-net .spry/deno/index.js

Grant additional permissions as needed by your app:

bash
deno run --allow-net --allow-read --allow-env .spry/deno/index.js

Deno Deploy

To deploy to Deno Deploy, push index.js to a repository and point your project entrypoint at it, or use the deployctl CLI:

bash
deployctl deploy --project=my-app .spry/deno/index.js

Good fit

  • Teams already deploying on Deno
  • Self-hosted deployments where deno run is the runtime contract
  • Deno Deploy for a zero-config edge option

Released under the MIT License.