Service to gather information about Weather in Asturias.
- AEMET API: it's an API REST service for meteorology data from Spain
- ASTURIAS-WEAHTER-BOT-GATHER: microservice to request forecasting and municipality data
- ASTURIAS-WEATHER-BOT-API: microserive to manage CRUD operations
- DATABASE: storages data of forecastings and municipalities
- ASTURIAS-WEATHER-BOT-SENDER: microservice to create tweets about forecasting and munipality data
Software requited to run this project:
- Git
- NodeJS v10.16.0
- NPM v6.14.5
- Nodemon (optional)
- PM2 (optional)
- Clone the repo and navigate to the workspace folder:
git clone https://github.com/IgnacioRubio/asturias-weather-bot-gather.git
cd asturias-weather-bot-gather
- Install project dependencies
npm install
- Create and set up environment variables into .env file
echo > .env
AEMET_API_KEY=(get it from AEMET page)
DB_URL_API=3000
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=465
EMAIL_AUTH_USER=example@example.com
EMAIL_AUTH_PASS=example123
EMAIL_MSG_FROM=exmaple@example.com
EMAIL_MSG_TO=example@example.com
- Run GATHER service
npm start
asturias-weather-bot-gather
├── index.js
├── LICENSE
├── package.json
├── package-lock.json
├── README.md
└── src
├── services
│ ├── email.js
│ ├── forecasting.js
│ └── municipality.js
└── util
└── env.js
PM2 is used to make the deployment.
- Run package.json script
npm run pm2
- List service
pm2 list
- Restart service after update
pm2 restart awb-gather
- Stop service
pm2 stop awb-gather
- NodeJS - JavaScript runtime
- Express - Web application framework
- nodemailer - Easy as cake e-mail sending
- node-schedule - A cron-like and not-cron-like job scheduler
- dotenv - Storing configuration in the environment
This project is licensed under the MIT License - see the LICENSE.md file for details