A minimal REST API in Go for ArgoCD deployment demonstrations.
- Simple REST API with 3 endpoints
- Environment management with .env files
- Docker support
- CI/CD with GitHub Actions
/- Returns welcome message for demo API/health- Returns API health status/docs- Returns dummy documentation data
- Go 1.21 or higher
- Docker (optional)
- Clone the repository
git clone https://github.com/organization/go-api-template.git
cd go-api-template- Install dependencies
go mod tidy- Create a .env file
cp .env.example .env- Run the application
go run main.goBuild the Docker image:
docker build -t demo-api .Run the container:
docker run -p 8080:8080 demo-apiTest the endpoints:
curl http://localhost:8080/
curl http://localhost:8080/health
curl http://localhost:8080/docsThis API is designed for demonstration purposes with ArgoCD running on OrbStack.