Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 910 Bytes

README.md

File metadata and controls

37 lines (25 loc) · 910 Bytes

42-API-AGGREGATOR-CRON

📅 42 API AGGREGATOR CRON update a mysql database previously created with 42-API-AGGREGATOR using nodejs and cron

Getting started

(node)

  • Install nodejs and make sure npm is in your PATH

(project & node_modules)

$> git clone https://github.com/42Charts/42-api-aggregator-cron.git && cd 42-api-aggregator-cron && npm i

(Environments variables)

In the project root $> touch .env

then in your file add the following keys

DB_HOST=localhost
DB_USER=root
DB_PASSWORD=
DB_NAME=myDB
FT_API_ENDPOINT=https://api.intra.42.fr
FT_API_UID=MY_APP_UID
FT_API_SECRET=MY_APP_SECRET
FT_API_RATE_LIMIT_PER_SECOND=1.8
FT_API_RATE_LIMIT_PER_HOUR=1200

(Start)

$> npm run start

License

MIT