Template project to get started with a simple API skeleton in Go and Docker
MIT License
A template project to create a Docker image for a Go application. The example application exposes an HTTP endpoint through a REST API packaged as a static binary. View on Docker Hub or GitHub Container Registry.
This example project uses Docker Compose to build and run the example application.
docker-compose up --build -d
docker-compose logs -f
After a kick-start, you can access the application through the following URL: http://localhost:3000
. You can test the application by running the following command:
curl http://localhost:3000
You can do a local development of the application by running the following command: go run main.go
.
GitHub Codespaces is a new feature in GitHub that allows you to run your code in a sandboxed environment on cloud. To run the project on GitHub Codespaces, follow these steps:
Code
button beside the Go to file
and Add file
buttons.Codespaces
in the dropdown menu and click New Codespace
.go run main.go
to start the application.Devcontainer is a feature in Visual Studio Code that allows you to run and execute your code in a Docker container. To run the project on Devcontainer, follow these steps:
go run main.go
to start the application.The relevant tools for building, linting, and testing the application are used: