-
Notifications
You must be signed in to change notification settings - Fork 1
Dev Setup
Rodrigo Gomes da Silva edited this page Nov 3, 2017
·
1 revision
- Clone the repository
$ git clone https://github.com/rodrigogs/github-metrics.git
- Install dependencies
$ cd github-metrics && npm install
-
Configure your environment variables according to the
.env.sample
file -
Go to your GitHub developer settings at https://github.com/settings/installations
-
Create a new app to authenticate the backend api requests and set github-metrics variables according to it:
- GITHUB_CLIENT_ID=my-app-id
- GITHUB_CLIENT_SECRET=my-app-secret
-
Create another app to authenticate clients and set github-metrics variables according to it:
- GITHUB_USERS_CLIENT_ID=my-user-app-id
- GITHUB_USERS_CLIENT_SECRET=my-user-app-secret
-
Start ngrok
$ ./ngrok http 3000 # 3000 is relative to the PORT variable
-
Copy the generated ngrok url
-
Create or edit a webhook that will send data to your application with the copied ngrok url
-
Set your app variable APP_URL as the generated ngrok url
- APP_URL=https://my-ngrok-url.com
-
Start the app
$ npm start