Authenticate with Github and get repositories information.
- Register a new application on Github:
- Go to https://github.com/settings/applications/new and enter the following information:
- Application name: githubOauth
- Homepage URL: https://localhost:8181
- When you register the application, the client ID, and client secret will be presented
- Copy this values to the
config/index.js
in thegithub_oauth_options
object - In this file, change
token_secret
for something else. This is the key used to sign the authentication tokens. You can change the project name and the port if you want
- Inside the cloned repository execute
npm install
to download dependencies - Once install is completed execute
npm run setup:init
This will:- Start RethinkDB:
rethinkdb
- Import the schema and permission rules to RethinkDB server:
hz schema apply -n githubOauth -c localhost:28015 ./config/rethinkdb/schema.toml
(change the name of the project if you changed in the previous step and the connection URL if it is different for you) - Create the self-signed certificate (
hz create-cert
) for SSL and move them to theconfig/tls
directory:hz create-cert && mv *.pem config/tls
(this command will create two files,horizon-cert.pem
andhorizon-key.pem
which you can find inconfig/tls
)
- Start RethinkDB:
- Execute
npm start
to bundle the application and start the Node.js server - Go to https://localhost:8181 (or whatever your URL is), log in with your Github account and start playing with the app.
MIT