Quickstart

Let's get you started quickly. This page is aimed to get you up and running from scratch.

Native

  1. Clone this repository git clone git@github.com:codoworks/go-boilerplate.git
  2. Run cd go-boilerplate
  3. Run go get to install dependencies
  4. Run go run . db migrate to create the database schema
  5. Run go run . db seed to seed the DB with initial data
  6. Run go run . start to start the server, you should see the following:

Service Output

...
 http server started on [::]:8081
 http server started on [::]:8080
 http server started on [::]:8079
  1. List available routes using go run . info public-api-routes and use your favourite API client to test. or use the following to get started and make sure you're up and running.

Example curl commands

curl -H "Accept: application/json" http://127.0.0.1:8081/health/alive
curl -H "Accept: application/json" http://127.0.0.1:8081/health/ready

Docker


For more details on running and using the service, scroll down to "Operations" section.

To learn about developing and extending this service, scroll down to "make it your own" section.

Was this page helpful?

Consider supporting my work if you find it useful

Buy me a coffee