Skip to content

[DEPRECATED] omshub API -- MOVED equivalent functionality over to Firebase as of July 2022, see `omshub/website`

License

Notifications You must be signed in to change notification settings

omshub/core-api

Repository files navigation

[NOTICE] - DEPRECATED

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.

OMSHUB backend API (stub)

Go project using Gin router - https://github.com/gin-gonic/gin

Setup

VSCode fast-path

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:

  1. Install the Remote - Containers VSCode extension.
  2. Open the repository with VSCode. You should see a prompt on the bottom left of the screen to open the project inside the container.

Non-Docker/VSCode

  1. Install Go 1.18 and verify your installation by running go version.
  2. Install golangci-lint.
  3. Install Delve.
  4. Clone the repo.

Development

Run

  1. Run make build to produce the executable binary.
  2. Run ./core-api to start the server.

Test

  1. Run make test to execute Go tests.

Debug

  1. Run make debug to debug the server. You can alternatively use the debugging capabilities provided by your editor.

Directories

  • cmd/ - This is where the entrypoint into the application is (at api/main.go)
  • internal/ - This is where the routes of the server are defined. They are then imported into the main application in cmd/api/main.go

Currently there are only 2 routes defined, / and /ping.

About

[DEPRECATED] omshub API -- MOVED equivalent functionality over to Firebase as of July 2022, see `omshub/website`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published