This is a simple Node.js application that uses the OpenWeatherMap API to display the current weather for a chosen city.
To get started with this application, ensure you have Node.js and npm installed on your system.
- Clone the repository to your local machine.
- Navigate to the project directory and run
npm install
to install the dependencies.
Obtain an API key from OpenWeatherMap and add it to a .env
file in the root of the project:
OPENWEATHER_API_KEY=your_api_key
To run the application, use the following command, replacing "City"
with the name of the city you want to get the weather for:
node weather.js "City"