To run the project for development, run:
go run main.go
To build a binary, run:
go build
The project is hosted at localhost:1323
Compiled Docker Images are also availble as ubcuas/gcom-2023-backend
To run GCOM-2023 using a docker image, ensure you have docker install and run
docker pull ubcuas/gcom-2023-backend:latest
docker run -it --rm -p 1323:1323 ubcuas/gcom-2023-backend:latest
To access the automatically generated documentation for the API,
navigate to the Swagger Docs at localhost:1323/swagger//index.html
TBD
This is where struct definitions go, using the naming convention structname_model.go
. Remember to add your models to migrate.go
as well so
their tables are automatically created.
This is where controllers for the structs go, which handle all the operations which will be performed with that struct (CRUD for example). Use the naming convension structname_controller.go
This is where we will store reusable response objects to ensure a consistent messaging format. We encourage using
error_response.go
to send error responses to standardize them
This is where utility classes go.
This is where configurations go and is also where the db code is stored.
This is where tests for every model go, using the naming convention structname_test.go
The waypoint set of files waypoint_models.go
and waypoint_controller.go
are heavily annotated to provide context as to what most lines are doing and why they are there. Other help can be found in the documentation for both major dependencies, linked above.