Development servers and tests
Starting development servers
Section titled “Starting development servers”Backend
Section titled “Backend”The backend requires a built user interface. Run
$ (cd ui && yarn build)Start the server in development mode.
$ go run .User interface
Section titled “User interface”Start the user interface development server.
Commands should be run in the ui directory.
$ yarn startOpen http://localhost:3000 in your favorite browser.
The user interface requires a running Notifly server on localhost:80. This can be configured in
ui/src/index.tsx.
Updating the Swagger specification
Section titled “Updating the Swagger specification”Notifly REST API is documented via Swagger. The Swagger definition is generated from source code comments.
After changing such a source code comment you can run the following command to update the Swagger definition.
$ make update-swaggerRunning backend tests
Section titled “Running backend tests”Running tests with parallelism
Section titled “Running tests with parallelism”$ go test ./...Running tests with coverage
Section titled “Running tests with coverage”$ make test-coverage$ go tool cover -html=coverage.txt # get coverage report in HTMLRunning tests with the race detector
Section titled “Running tests with the race detector”$ make test-raceRunning user interface tests (end2end)
Section titled “Running user interface tests (end2end)”Build the user interface because end2end tests must be run against the production build. (This should be done after every change to the user interface)
$ (cd ui && yarn build)Now run the tests with yarn
$ (cd ui && yarn test)Running static analysis checks
Section titled “Running static analysis checks”The following command checks formatting and runs some analyzers, such as tslint and govet.
$ make check