1.0.0 • Published 3 years ago

cli-city-weather v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Cli-city-weather

Find weather and save in file

Simple script for saving weather info to your computer by running one command

Installation

Cli-city-weather requires Node.js v14.7.0+ to run.

Install the dependencies.

cd yourProjectName
npm init
npm install cli-city-weather
touch index.js

Inside index.js

const saveWeather = require('cli-city-weather')

saveWeather()

Go to openweathermap. Once you sign up using your email, the API key (APPID) will be sent to you in a confirmation email. Your API keys can always be found on your account page, where you can also generate additional API keys if needed.

Create .env file:

APP_ID=your_api_id

Usage

To save weather in ~/Downloads/weather.json run:

node index.js Novosibirsk ~/Downloads

To save weather in ~/Downloads/test.txt run:

node index.js Moscow ~/Downloads/test.txt

To save weather in current directory in weather.json run:

node index.js Krasnodar

License

MIT