A lightweight API to monitor local or remote server metrics — built with Hono.js, Docker, and TypeScript.
Minimal REST API exposing system metrics:
| Endpoint | Description |
|---|---|
/ |
Health check (confirms server is up) |
/metrics |
Returns uptime, memory usage, CPU load |
- Hono.js — minimalist web framework for building APIs
- Node.js 20+ — JavaScript runtime
- TypeScript — type-safe modern JavaScript
- Docker — containerized local development
- Docker Compose — orchestration of local services
- Nodemon + ts-node — automatic reload on file change during development
git clone https://github.com/NolanBeaujault/server-playground.git
cd server-playgroundnpm installnpm run devdocker compose up --buildThe application will be accessible on localhost:3000
server-playground/
│
├── src/
│ └── index.ts # API entrypoint
│
├── Dockerfile # Dev-oriented Dockerfile
├── docker-compose.yml # Container orchestration
├── .env # Local environment variables (e.g., port)
├── package.json # Project metadata and scripts
├── tsconfig.json # TypeScript configuration
This section tracks upcoming improvements.
- Add persistent logging (e.g., Winston or Pino)
- Export metrics in Prometheus-compatible format
- Add authentication for
/metricsendpoint - Add system details per endpoint (
/cpu,/ram, etc.) - Add dashboard frontend to visualize metrics
- Prepare production-ready Dockerfile and multi-stage build
This project serves as a personal playground to:
- Practice building minimal web APIs
- Get familiar with Docker/Docker Compose workflows
- Explore performance monitoring and containerized development
- Iterate with clean, scalable architecture from day one
You're welcome to fork the project, explore, or submit improvements:
- Fork this repo
- Create a new branch (
git checkout -b feature/your-feature) - Make your changes
- Push to your branch (
git push origin feature/your-feature) - Open a pull request
MIT — free to use, remix, and distribute.