Skip to content

Getting started with development

Eric Walker edited this page Jul 4, 2020 · 3 revisions

Requirements

  • Postgres 12
  • Redis 5
  • Go 1.14
  • Yarn

Set up the project:

$ export DIGRAPH_POSTGRES_CONNECTION="dbname=digraph_dev user=postgres sslmode=disable"
$ mkdir $GOPATH/src/github.com/emwalker
$ cd $GOPATH/src/github.com/emwalker
$ git clone [email protected]:emwalker/digraph.git
$ cd digraph
$ make load-fixtures
$ go get -u github.com/golang-migrate/migrate
$ go get -u github.com/99designs/gqlgen
$ make generate
$ go get -u ./...
$ yarn install
$ yarn relay

Run the tests:

$ make test
$ make test-integration

Run the app in development:

$ make start

In order to log in, you'll need to configure a dedicated OAuth app in GitHub and set the following environment variables:

$ export DIGRAPH_GITHUB_CLIENT_ID="..."
$ export DIGRAPH_GITHUB_CLIENT_SECRET="..."
Clone this wiki locally