Stop console.log()-ing every request.
reqlog gives you a live dashboard of every HTTP request hitting your server — zero config.



Install

npm install reqlog-express

Express — 3 lines, done

import express from 'express';
import { reqlog } from 'reqlog-express';

const app = express();
app.use(reqlog());          // dashboard opens → http://localhost:9000
app.listen(3000);

That's it. Open localhost:9000 and start making requests.


NestJS

npm install reqlog-nestjs
// app.module.ts
import { Module } from '@nestjs/common';
import { ReqlogModule } from 'reqlog-nestjs';

@Module({
  imports: [ReqlogModule.forRoot()],
})
export class AppModule {}

Fastify

npm install reqlog-fastify
import Fastify from 'fastify';
import { reqlogPlugin } from 'reqlog-fastify';

const app = Fastify();
await app.register(reqlogPlugin);
await app.listen({ port: 3000 });

Go (net/http, Gin, Chi)

go get github.com/reqlog/reqlog-go
package main

import (
    "net/http"
    reqlog "github.com/reqlog/reqlog-go"
)

func main() {
    rl := reqlog.New(reqlog.Options{Port: 9000})
    rl.Start()
    defer rl.Stop()

    mux := http.NewServeMux()
    mux.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {
        w.Write([]byte("Hello!"))
    })

    http.ListenAndServe(":3000", rl.Middleware()(mux))
}
Gin example
import "github.com/gin-gonic/gin"

r := gin.Default()
r.Use(rl.GinMiddleware())

Build with go build -tags gin to enable Gin support.

Chi example
import "github.com/go-chi/chi/v5"

r := chi.NewRouter()
r.Use(rl.ChiMiddleware())

Chi uses standard net/http middleware — no build tags needed.


What you get

  • Live request stream — every request appears instantly via SSE. No polling, no refresh.
  • Full inspection — headers, parsed JSON body, status codes, latency for both request and response.
  • Slow request flags — anything over the threshold gets highlighted so you spot bottlenecks fast.
  • Payload diff — compare the current request body against the previous call to the same endpoint.
  • One-click replay — resend any captured request and inspect the new response side by side.
  • Method + status badges — color-coded GET POST PUT PATCH DELETE and 2xx 3xx 4xx 5xx.

Options

app.use(reqlog({
  port: 9000,           // dashboard port (default: 9000)
  maxRequests: 200,     // entries kept in memory (default: 200)
  slowThreshold: 200,   // ms before a request is flagged slow (default: 200)
  autoOpen: true,       // open browser on start (default: true)
  allowInProd: false,   // block in production unless explicitly true
}));
OptionTypeDefaultDescription
portnumber9000Port the dashboard listens on
maxRequestsnumber200Max entries in the in-memory ring buffer
slowThresholdnumber200Latency (ms) above which a request is flagged slow
autoOpenbooleantrueAuto-open the dashboard in your browser
allowInProdbooleanfalseOverride production blocking (use with caution)

How it works

Your App (Express / NestJS / Fastify / Go)
  │
  ├── reqlog middleware intercepts req/res
  │     ├── captures headers, body, timing
  │     └── pushes entry to in-memory ring buffer
  │
  └── reqlog dashboard server (:9000)
        ├── GET  /events        → SSE stream
        ├── GET  /api/requests  → all buffered entries
        └── POST /api/replay/:id → replay a request

No external dependencies. No database. No config files. Just middleware → dashboard.


Development only

reqlog is a dev tool. It is blocked by default in production — the dashboard won't start and no port will be opened.

RuntimeEnv variable checked
Node.jsNODE_ENV=production
GoGO_ENV=production or APP_ENV=production

To explicitly override (e.g. staging with production-like config):

// Node.js
reqlog({ allowInProd: true })
// Go
reqlog.New(reqlog.Options{AllowInProd: true})

Only use this if you understand the security implications — leaving dev tools enabled in production is a common source of vulnerabilities.


Packages

PackageDescription
reqlog-coreFramework-agnostic Node.js engine
reqlog-expressExpress middleware
reqlog-fastifyFastify plugin
reqlog-nestjsNestJS module
reqlog-goGo adapter (net/http, Gin, Chi)

Contributing

See CONTRIBUTING.md for setup instructions and development workflow.

License

MIT