This service keeps jsdelivr API database up to date. Head there for the user facing part.
Install node and npm on your system. For Mac, you can install Homebrew and then run brew install node
npm install
From the project root:
$ cp ./config/config.template.js ./config/config.js
- Edit newly created
./config/config.js
w/ appropriate values.
- Github API token under key
githubToken
- Github WebHooks secred under key
webhookSecret
- Logentries API token under key
logentriesToken
- Nodemailer smtp
host
andport
values under keysmtp
- Nodemailer smtp
user
andpass
values under keysmtpAuth
- Address to send notifications from under key
smtpFrom
- Address to send notifications to under key
smtpTo
- Configure the repos webhook setting, add a new webhook w/ the
push
event, urlYOUR_HOST/webhook
and secret that is the same aswebhookSecret
Alternatively you can specify the config values via process environment variables:
GITHUB_TOKEN
WEBHOOK_SECRET
LOGENTRIES_TOKEN
SMTP_HOST
andSMTP_PORT
SMTP_AUTH_USER
andSMTP_AUTH_PASS
SMTP_FROM_EMAIL
SMTP_TO_EMAIL
$ npm start
Your output data will be in the data/
directory.
To stop the process, send a shell termination ([Ctrl+c]
in Windows), then y
.
If you want to limit which CDNs api-sync crawls, edit the var cdns
line in [tasks/index.js](https://github.com/jsdelivr/api-sync/blob/master/tasks/index.js)
.
MIT. See LICENSE for details.