This is my third app with Node.js. With this app you are able to look for any city and get its weather thanks to Mapbox Geocoding API and OpenWeather API. For this project I used Colors.js, Inquirer, Axios and dotenv.
After downloading or cloning this repository, make sure to run npm install
to reconstruct the node_modules folder.
You also have to be registered at Mapbox and OpenWeather to have your own Api keys and use their APIS. Create a .env file and save there both of your API keys just as the example.env file that is on the repository's root, or you can look at the following example:
Then, to start using the app run the next command in your terminal:
npm start
It will appear the following menu:
Use arrow keys or the options's number to move though them, then select what you'd like to do by pressing ENTER.
- Search city: After you select this option, make sure to type the name of the city you want to get the weather from.
The app will show you up to 5 options for the cities that matches what you typed. select the one you think that matches the most with the city you want to get the weather from and then press ENTER. Then, you'll be able to see the weather of the city you searched and some more data.
- History: Here you'll able to see the last 6 cities you looked for.
- Exit: Closes the app.