5.0.1 • Published 7 years ago

wheather v5.0.1

Weekly downloads
2
License
ISC
Repository
-
Last release
7 years ago

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 = require('wheather')

// ...

getWheather(process.env.API_KEY, process.argv[2])
  .then(cityTemperature => {
    // do something with the temperature
  })

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
5.0.1

7 years ago

5.0.0

7 years ago

4.0.0

7 years ago

3.0.0

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago