Test Backend - Saudi Meters API
A simple Express.js server that serves the Saudi meters GeoJSON data.
Installation
npm install
Usage
Development Mode
npm run dev
Production Mode
npm run build
npm start
API Endpoints
GET /- API information and available endpointsGET /api/meters- Get all meters data (GeoJSON FeatureCollection)GET /api/meters/:id- Get specific meter by IDGET /health- Health check endpoint
Example Usage
# Get all meters
curl http://localhost:3001/api/meters
# Get specific meter
curl http://localhost:3001/api/meters/meter-757
# Health check
curl http://localhost:3001/health
The server runs on port 3001 by default, but you can override it with the PORT environment variable.