Weather
Give the weather for any given city.
Usage
Directly from the command line:
$ API_KEY=<openweathermap api key> node index.js <city>
As a library:
const getWeather = // ...
Features
- Call a remote API (hint: npmjs.com/package/got)
- Provide the API Key using varenv (hint: process.env)
- Display temperature in celsius
- Fail if API Key is missing
- Print the weather for a given city
- Pass city using command line parameter
- Publish as npm package
- Make the script as a function
- Expose API endpoint taking a city as argument