Skip to content

Add Deno Runtime SupportΒ #419

@eins78

Description

@eins78

Add Deno Runtime Support

Overview

Add dual runtime support to hello-world-web, allowing the application to run on both Node.js 22 and Deno 2.x with identical functionality.

Motivation

  • Learning: Explore Deno 2.x's Node.js compatibility in a real-world application
  • Performance: Compare runtime performance between Node.js and Deno
  • Modern tooling: Leverage Deno's built-in TypeScript, linting, and formatting
  • Flexibility: Maintain deployment options across runtimes

Implementation Status

βœ… Phase 1-3: Completed

  • Create deno.json configuration
  • Verify Express.js compatibility via npm: specifiers
  • Add pnpm start:deno and pnpm dev:deno scripts
  • Create runtime detection helper (packages/app/src/runtime.ts)
  • Verify all routes and SSR work on Deno

🚧 Phase 5-6: In Progress (PR #TBD)

  • Add Deno matrix to test.yml (lint + build)
  • Add Deno matrix to bdd-tests.yml (E2E tests)
  • Create optimized Dockerfile.deno (multi-stage, static compilation if possible)
  • Add Deno Docker E2E test workflow
  • Deploy Deno version to Cloud Run (dev-deno.hello.kiste.li)
  • Update documentation

Technical Details

No Code Changes Required!
The codebase was already Deno-compatible due to:

  • Pure ESM (`"type": "module"`)
  • `node:` prefixes on built-in imports
  • No `require()` calls
  • Modern TypeScript

Works Out of the Box:

  • βœ… Express 5.1 via `npm:express@^5.1.0`
  • βœ… All middleware (cookie-parser, morgan, dotenv)
  • βœ… @lit-labs/ssr (SSR + hydration)
  • βœ… Static file serving
  • βœ… All routes

Testing

  • Local: `pnpm start:deno` or `deno task start`
  • CI: Matrix strategy tests both runtimes in parallel

Deployment

  • Node: `hello.kiste.li` (existing, unchanged)
  • Deno: `dev-deno.hello.kiste.li` (new, separate service)

Design Document

See docs/plans/2025-11-30-deno-runtime-support-design.md for complete design.

Related

  • Branch: `deno`
  • PR: #TBD

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestoperationsOperations, monitoring, and maintenance tasks

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions