Skip to content

feat(cli): cross-runtime start strategy (Node/Bun/Deno) #628

Description

@SisyphusZheng

Summary

Make the start CLI work across Deno, Node 18+, and Bun — or provide documented per-runtime alternatives. Currently cli/start.ts uses Deno.serve() and import.meta.main, making it Deno-only despite the project's cross-runtime claim.

Competitive context

Framework Dev/Prod server runtime
SvelteKit Node via adapters (node, cloudflare, vercel)
Next.js Node (built-in server)
Astro Node via adapters
Fresh Deno-only (acceptable — Deno framework)
openElement Deno-only start CLI (NOT acceptable — claims cross-runtime)

Proposed solution

Option A (preferred): Replace Deno.serve with node:http + Web Request/Response conversion:

  • Works in Node 18+, Deno (node: compat), Bun
  • ~40 lines of adapter code
  • No external dependency

Option B: Generate a Nitro .output/ directory during build and delegate to node .output/server/index.mjs

Option C: Document start as Deno-only; add start:node and start:bun scripts

Related

Target version

0.43.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions