Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.37 KB

File metadata and controls

52 lines (34 loc) · 1.37 KB

API Framework Demo (Go Version)

A reference implementation and starter kit for API Framework.

Getting Started

Dependency Installation

If you are using macOS and Homebrew, download and use the included Brewfile to install the required dependencies and services needed for local development:

brew bundle install /path/to/Brewfile

Setting up the local development environment

API Framework Go Demo uses docker to provide a containerized development environment. The project comes with a .env.dist file. You need to create a .env file for your purpose. You can initialize this environment by running:

cp .env.dist .env
make start-service

Once build process is complete, API Framework Go Demo will be available at http://localhost:8080. Default port is 8080. You can change the port by changing the value in docker-compose.yml.

        ports:
            - "8080:80"

Unit Tests

Unit tests are written with the testing package. Tests are executed as a part of:

make test

Or if you want to run tests only then you may run:

go test ./...

To view the test coverage report, run the command make test and check the dist folder for coverage.html.

To debug, check container logs

make logs