7db3588c2d
Bump axios from 0.19.0 to 0.21.1 |
||
---|---|---|
src | ||
.babelrc | ||
.editorconfig | ||
.env.sample | ||
.eslintrc.js | ||
.gitignore | ||
LICENSE | ||
README.md | ||
package-lock.json | ||
package.json |
README.md
umbrello-api
Rest API for umbrello-bot.
The weather information is based on OpenWeatherMap API.
Technologies:
- Node.js
- express
- mongodb
Installation
- Install
Node.js
andnpm
. - Install
mongodb
. - Clone this repository.
- Install dependencies with
npm install
- Create env file or set environment variables. (read "Environment variables" paragraph)
- Configure the list of city id (read "OpenWeatherMap - List Of City ID")
- Build with
npm run build
. - Start the server with
npm run serve
.
Environment Variables.
OWM_TOKEN=your-open-weather-map-token-api
OWM_LANG=en
OWM_UNITS=metric
TELEGRAM_TOKEN=your-telegram-bot-token
DB_HOST=mongodb://host:port/db
DB_USER=user
DB_PASSWORD=password
OpenWeatherMap - List Of City ID
- Download city.list.min.json.gz
- Extract the json.
- Import the json into MongoDB (collection:
umbrello_cities
).
License
GPLv3
Made with ❤️ by Francesco Esposito (@franjsco)