📡 42 API AGGREGATOR scrape 42 api school into a mysql DB with only usefull informations using nodejs & gruntjs
See tables
- Install nodejs and make sure
npm
is in your PATH - Install grunt $>
npm install -g grunt-cli
$> git clone https://github.com/yfuks/42-API-AGGREGATOR.git && cd 42-API-AGGREGATOR && npm i
Create a new app on 42 Intranet
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
$> npm run scripts
or grunt
note: not all tasks are in the prompt, to see all available tasks run grunt --help
to run a specific tasks you can run grunt init-database
where grunt specific-task