This project is an API for retrieving weather forecast data from the Indonesian Meteorological, Climatological, and Geophysical Agency (BMKG). It provides digital forecast data for various regions in Indonesia.
-
Clone the repository:
git clone https://github.com/nandasafiqalfiansyah/weather-bmkg-api.git
-
Install dependencies:
npm install
To start the server, you can use the following command:
npm start
Or if you prefer to run the server with auto-restart on file changes (using nodemon):
npm run dev
The API provides the following endpoints:
/weather/?weather=:region
: Get weather forecast data for a specific region.
Replace :region
with the desired region, e.g., aceh
, bali
, jakarta
.
To retrieve weather forecast data for Jakarta, you can send a GET request to:
http://localhost:3000/weather?weather=jakarta
- async: ^3.2.5
- body-parser: ^1.20.2
- cors: ^2.8.5
- express: ^4.18.2
- nodemon: ^3.0.3
- request: ^2.88.2
- xml2js: ^0.6.2
This project is licensed under the ISC License. See the LICENSE file for details.