Track github project events from webhooks.
- Node.js 7.6.0 >
- Redis server
- Mongodb
- Download or clone github-metrics latest release
$ yarn install
- Download ngrok to expose your computer port to receive webhook events
- Start nkrok
$ ngrok http 3000
- Create two Github OAuth Apps
- One for authenticate your application to use web hooks
- Authorization callback URL: https://your_url.ngrok.io/auth/githubtoken/callback
- Other for authenticate your application users
- Authorization callback URL: https://your_url.ngrok.io/auth/github/callback
- One for authenticate your application to use web hooks
- Create a .env file base on .env.sample and fill with the correct data
APP_NAME=GitHub Metrics
NODE_ENV=development
PORT=3000
MONGO_DB=mongodb://url
RECONNECTION_INTERVAL=15000
HTTP_LOG_CONFIG=dev
GITHUB_COMPANY_NAME=your_company_name
GITHUB_CLIENT_ID=client_id
GITHUB_CLIENT_SECRET=client_secret
GITHUB_USERS_CLIENT_ID=client_users_id
GITHUB_USERS_CLIENT_SECRET=client_users_secret
REDIS_URL=redis://url
APP_URL=https://your_url.ngrok.io
SESSION_SECRET=my-secret
- Start the application:
$ yarn start
-
Single instance
$ NODE_ENV=production node bin/www
-
Cluster
$ NODE_ENV=production node bin/fork
$ yarn test
Licence © Rodrigo Gomes da Silva