Files
maplibre-poc/test-backend/README.md
2025-08-20 10:33:17 +02:00

802 B

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 endpoints
  • GET /api/meters - Get all meters data (GeoJSON FeatureCollection)
  • GET /api/meters/:id - Get specific meter by ID
  • GET /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.