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.
Click to show internal directories.
Click to hide internal directories.