express-in-zip

command
v1.18.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

express-in-zip — the proof point: a legacy Express-shaped TypeScript handler running inside zip with ZERO rewrite.

app.ts (TS) --esbuild--> ES2015 JS --goja--> JSHandler --> Fiber route

go run ./examples/express-in-zip
curl http://localhost:8080/legacy/foo
curl -XPOST -d '{"x":1}' -H content-type:application/json \
     http://localhost:8080/legacy/bar
curl -XPOST -d '{"source":"40+2"}' -H content-type:application/json \
     http://localhost:8080/runtime/js

Every route here is registered on the ZIP router. Nothing goes on app.Fiber() directly: a route registered there gets no *zip.Ctx, no error handler, no middleware and no Authorizer — it is served by the app but not governed by it, which is a security seam, not a shortcut. app.Fiber() is for reading Fiber-only APIs, not for registering routes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL