Koa
Koa 3: CI runs it with @koa/router and @koa/bodyparser, and a route that reads a large JSON body
keeps its profile. Your server’s code does not change: follow Setup to install
the package, profile the Prisma client and add the preload.
The dev command
Section titled “The dev command”{ "scripts": { "dev": "tsx watch --import query-profiler/register src/server.ts", "start": "node dist/server.js" }}In plain JavaScript, node --watch --import query-profiler/register src/server.js. Other watchers
are in Setup.
With @koa/cors, a page on another origin can read
X-Debug-Token: the preload exposes it. If you set exposeHeaders, your list replaces it, so add
the token there:
app.use(cors({ origin: "http://localhost:5173", exposeHeaders: ["X-Debug-Token"] }));In production no response carries it, so the extra name does nothing.