الملفات

q1-deploy-monitor

Ghaymah Cloud link : https://ghaymah-sre-exam-54facf02817d.hosted.ghaymah.systems

Small Node.js and Express API for an SRE take-home assessment.

Install

npm install

Run locally

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:

docker build -t q1-deploy-monitor .

Run:

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:

sh health-check.sh

It calls /health every 30 seconds and prints timestamp, status, and response time.