Quick start
Install the peekinside package, attach it to your app, and open the dashboard.
Install#
npm install peekinside
PeekInside needs Node.js 18 or later.
Attach it to your app#
import express from 'express';
import PeekInside from 'peekinside';
const app = express();
PeekInside.attach(app);
app.use(express.json());
// ...your routes
app.listen(3000);
Start your app as usual. PeekInside prints the link to its dashboard:
[peekinside] Requests from orders-api: http://localhost:7335/p/orders-api-1a2b3c4d
Middleware order doesn't matter: request bodies are captured as your app reads them.
Koa, Fastify and native http#
PeekInside.attach(koaApp); // new Koa()
PeekInside.attach(fastify); // Fastify(), before fastify.listen()
PeekInside.attach(server); // http.createServer(...)
Servers created with http.createServer(app) are detected automatically.
TypeScript and CommonJS#
Type definitions ship with the package:
import PeekInside, { type PeekInsideOptions } from 'peekinside';
const options: PeekInsideOptions = { project: 'orders-api', ignorePaths: ['/health', /^\/metrics/] };
PeekInside.attach(app, options);
They use the Node.js types from @types/node, which TypeScript projects for Node.js already have.
PeekInside is an ES module. CommonJS apps load it with require() on Node.js 20.19+ and 22.12+:
const { default: PeekInside } = require('peekinside');
TypeScript compiled to CommonJS can keep import PeekInside from 'peekinside', with esModuleInterop (on by default with "module": "nodenext").
Next#
- Open the local dashboard and look around: using the dashboard explains filters and shortcuts.
- When your app runs on a server, connect it to PeekInside Cloud.