Core APIs for LibreWeather/libre-weather
- Create a
.envfile in the root with Backend env vars (see Supported Backends) - Optionally add
SCOPEandLOG_LEVELas well, for logging management. - Run
npm iandnpm run dev. This will start an auto-reloadingnodemoninstance, serving the API at localhost:3000.
Check for existing known issues or planned changes, and feel free to contribute.
Swagger doc included at /docs.
OpenWeather Maps
BACKEND=OWMOWM_KEY=key-here
BACKEND=METEO
BACKEND=PIRATEPIRATE_WEATHER_KEY=key-here
A request can select another backend with x-backend (OWM, METEO, or PIRATE) and x-backend-key. An unknown name, an unusable key, or a failed fetch falls back to BACKEND. The response header x-backend names the backend that served the body.