This is a simple API that provides a URL for an image based on the current weather conditions in a specified city. It uses the OpenWeatherMap API to get the weather data and returns an image URL from a pre-defined list of images based on the current weather condition.
Node.js v14.0 or higher An OpenWeatherMap API key
- Clone the repository:
git clone https://github.com/your-username/PXL8-Stormy-Weather.git
- Install dependencies
npm install
- Create a .env file in the root directory of the project and add your OpenWeatherMap API key:
API_KEY=your-api-key
-
Start the server:
npm run start
-
Open a web browser and go to http://localhost:3000 to see the current weather image for the default city (Belo Horizonte).
-
If you want to use other images just go on enums and change the images url.
-
If you want to change the city just go on envs and set your city.