This app is no longer under active development as of June 2022. As of July 2022, the OMSHub website project shall use Firebase moving forward as a "backend service" instead.
Go project using Gin router - https://github.com/gin-gonic/gin
This project includes a .devcontainers configuration that can be used by VSCode to create a one-click development environment with Docker. The Docker container includes all of the dependencies you need to compile Go, forwards the port exposed by HTTP server to your local machine, and mounts the repository into the container so changes persist outside of Docker.
To get started:
- Install the Remote - Containers VSCode extension.
- Open the repository with VSCode. You should see a prompt on the bottom left of the screen to open the project inside the container.
- Install Go 1.18 and verify your installation by running
go version
. - Install golangci-lint.
- Install Delve.
- Clone the repo.
- Run
make build
to produce the executable binary. - Run
./core-api
to start the server.
- Run
make test
to execute Go tests.
- Run
make debug
to debug the server. You can alternatively use the debugging capabilities provided by your editor.
cmd/
- This is where the entrypoint into the application is (atapi/main.go
)internal/
- This is where the routes of the server are defined. They are then imported into the main application incmd/api/main.go
Currently there are only 2 routes defined, /
and /ping
.