Adding application and DockerImage

هذا الالتزام موجود في:
2026-07-29 02:33:01 +03:00
الأصل 3e2e01add3
التزام 2c6df58cef
624 ملفات معدلة مع 68945 إضافات و0 حذوفات

عرض الملف

@@ -0,0 +1,52 @@
# q1-deploy-monitor
Small Node.js and Express API for an SRE take-home assessment.
## Install
```bash
npm install
```
## Run locally
```bash
npm start
```
The server listens on `PORT` or `3000`.
Open the dashboard in the browser at `http://localhost:3000/dashboard`.
You can also open `dashboard.html` directly if the API server is running on `http://localhost:3000`.
## Docker
Build:
```bash
docker build -t q1-deploy-monitor .
```
Run:
```bash
docker run -p 3000:3000 q1-deploy-monitor
```
## Endpoints
- `GET /` - basic API message
- `GET /health` - health status, uptime, and timestamp
- `GET /metrics` - health plus request count and memory usage
- `GET /dashboard` - simple HTML dashboard
## Health check script
Run:
```bash
sh health-check.sh
```
It calls `/health` every 30 seconds and prints timestamp, status, and response time.