- redis server running at port 6379
- mongodb server running at port 27017
$ ./build.sh
or
$ make build$ go-rest-api serve-rest -c local.config.yml --env=local
or
$ make run$ go test $(go list ./... | grep -v go-rest-api/e2e_test) -v- run test server
$ ./build.sh && go-rest-api serve-rest --config test.config.yml --env=test
or
$ make test-server- in seperate terminal window run the test suites
$ go test ./e2e_test --config=../test.config.yml -ginkgo.v --env=test
or
$ make run-tests $ docker-compose -f docker-compose-dev.yml up --build
or
$ make serve-containerSteps are described in k8s.README.md file
- api folder contains rest controllers, middlewares
- cmd folder contains application's base like main files
- config folder contains app configuration files
- e2e_test folder contains end-to-end testing suits
- infra contains drivers like db, messaging, cache etc
- repo folder contains database code
- model folder contains model
- service folder contains application service
cmd -> api -> service -> repo, models, cache, messaging
Method: GET
URL: http://{base_url}:{system_server_port}/system/v1/health/api
Response:
status_code: 200
{
"data": "ok"
}
Method: GET URL: http://localhost:8000
Response: status_code: 200
{
"message": "success",
"data": {
"method": "GET",
"service_name": "Go rest api"
}
}