665
A lightweight REST API playground + real-time request logger built with Bun.
It exposes a JSON API endpoint and a professional web dashboard that streams request logs via WebSocket (auto reconnect) and persists them in localStorage.
/ws)Accept: text/html (responsive UI)localStorage (survives refresh)Pull the image:
docker pull jefriherditriyanto/rest-api-logger:latest
Run it:
docker run --rm -p 3000:3000 jefriherditriyanto/rest-api-logger:latest
Open the dashboard:
http://localhost:3000/The dashboard is returned when the client sends Accept: text/html.
Examples:
curl -H "Accept: text/html" http://localhost:3000/
Any request that does not ask for text/html will:
Example:
curl -X POST http://localhost:3000/api/test \
-H "Content-Type: application/json" \
-d '{"hello":"world"}'
Response includes:
methodpathqueryheadersbodyws://<host>/wsEach log event contains (at minimum):
idtimestampmethodoriginpathfullUrlqueryheadersbodyInstall dependencies:
bun install
Run:
bun run index.ts
The server listens on:
http://localhost:3000/Thanks to everyone who contributes to this project.
If you want to contribute, feel free to open an issue or submit a pull request.
If this project helps you, consider supporting its development.
Content type
Image
Digest
sha256:40896cc95…
Size
65.4 MB
Last updated
7 months ago
docker pull jefriherditriyanto/rest-api-logger