Skip to content

Development servers and tests

The backend requires a built user interface. Run

Окно терминала
$ (cd ui && yarn build)

Start the server in development mode.

Окно терминала
$ go run .

Start the user interface development server.

Commands should be run in the ui directory.

Окно терминала
$ yarn start

Open 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.

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-swagger
Окно терминала
$ go test ./...
Окно терминала
$ make test-coverage
$ go tool cover -html=coverage.txt # get coverage report in HTML
Окно терминала
$ make test-race

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)

The following command checks formatting and runs some analyzers, such as tslint and govet.

Окно терминала
$ make check