Git Product home page Git Product logo

api-sync's Introduction

jsdelivr - api-sync

Build Status

This service keeps jsdelivr API database up to date. Head there for the user facing part.

Usage

Install node and npm on your system. For Mac, you can install Homebrew and then run brew install node

Install dependencies

npm install

Configure module

From the project root:

  1. $ cp ./config/config.template.js ./config/config.js
  2. 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 and port values under key smtp
  • Nodemailer smtp user and pass values under key smtpAuth
  • Address to send notifications from under key smtpFrom
  • Address to send notifications to under key smtpTo
  1. Configure the repos webhook setting, add a new webhook w/ the push event, url YOUR_HOST/webhook and secret that is the same as webhookSecret

Alternatively you can specify the config values via process environment variables:

  • GITHUB_TOKEN
  • WEBHOOK_SECRET
  • LOGENTRIES_TOKEN
  • SMTP_HOST and SMTP_PORT
  • SMTP_AUTH_USER and SMTP_AUTH_PASS
  • SMTP_FROM_EMAIL
  • SMTP_TO_EMAIL

Run the module

  $ 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.

Select CDNs

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).

License

MIT. See LICENSE for details.

api-sync's People

Contributors

bebraw avatar fulldecent avatar gavinhungry avatar jimaek avatar jmervine avatar martinkolarik avatar megawac avatar tombyrer avatar unboundev avatar yasuyk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.