- Clone repository
- Run npm i
- Set up .env with DB_URL - your mongoDB url, DB - your db for the app, POST_URL - reciving endpoint, SCHEDULE - parsing schedule in cron syntax
- Launch with node app.js
- Examples of feeds are in sites.json
- /status method: get, body: {} returns json with app status: schedule, cache_accsess_times, and jsons_sent
- /sites method: get, body: {} returns json with sites to parse following format of the example in sites.json
- /sites method: post, body: {[ { "site":"Site Name", "url":"Site Url" }]} recives json with new site to parse to add to list. Duplicates are filtered out. If success, returns OK!.
- /sites method: delete, body: the same as in POST. Allows to delete sites from list. If success, returns OK!.
- Make sure to set up env variables in docker-compose.yaml and Dockerfile
- Cd into directory
- Use docker-compose up
- Do not forget to add sites via endpoint