TBD
PORTused to determine the port bound to by the API at startupMONGO_INITDB_ROOT_USERNAMEroot user for mongodbMONGO_INITDB_ROOT_PASSWORDroot password for mongodbMONGO_INITDB_DATABASEinitial databaseMONGO_CLUSTER_ADDRESSaddress to connect to
-
Build and bring up the local dev container:
docker-compose up -d api -
Attach to the container using VScode's extension: Remote - Containers
-
Develop!
-
you can run your binaries in the container:
cd cmd/api/ && go build && ./api -
Noteyou need to re-build the image if you need to install any go modules viago getoutside the container (working on a fix for this)
- Run
go test ./cmd/api/tests
- For the OpenAPI spec, refer to http://localhost:5000/swagger/index.html while running the API
- To update the swagger spec, run
swag i cmd/api/from the project root