Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
93 lines (61 sloc) 1.76 KB

Setup Developer Environment

Requirements

  • Go 1.12+
  • Node 11.x
  • Yarn 9+
  • Docker (optional)

Clone sources

Clone traggo/server source from git:

$ git clone https://github.com/traggo/server.git && cd server

Env Variables

If you are in GOPATH, enable go modules explicitly:

$ export GO111MODULE=on

Download tools

This contains tools for formatting and linting.

$ make download-tools

Install dependencies

Install Go and Yarn dependencies.

# make install

Code Generation

The server and ui depends heavily on graphql, for this we use code generators which generate models and resolvers from our schema.graphql. The following command shoud be executed after any change to the file.

$ make generate

Formatting Code

Both the server and the ui uses tooling for formatting the code. You can format all files with:

$ make format

Linting

We use multiple linters for our code. You can run them all with

$ make lint

Starting the server

$ go run main.go

This starts the traggo server on localhost3030.

!!! node When traggo is started in dev mode (which is by default enabled) then it will load additional config files.

* Normal Env Variables
* `.env.development.local`
* `.env.development`
* The rest from [Configuration#precedence](../config.md#precedence).

The `.env.development.local`-file should be used for local changes as it is git ignored.

Starting the React-UI

Commands must be executed inside the ui directory.

$ yarn start

The ui development server will be started on localhost:3000.

You can’t perform that action at this time.