Quickstart
Let's get you started quickly. This page is aimed to get you up and running from scratch.
Native
- Clone this repository
git clone git@github.com:codoworks/go-boilerplate.git
- Run
cd go-boilerplate
- Run
go get
to install dependencies - Run
go run . db migrate
to create the database schema - Run
go run . db seed
to seed the DB with initial data - 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
- 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
Recommended: run go run .
and explore all available options, it should be straightforward.
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.