Skip to content
 
 

Repository files navigation

Go Demo API _test

A minimal REST API in Go for ArgoCD deployment demonstrations.

Features

  • Simple REST API with 3 endpoints
  • Environment management with .env files
  • Docker support
  • CI/CD with GitHub Actions

Endpoints

  • / - Returns welcome message for demo API
  • /health - Returns API health status
  • /docs - Returns dummy documentation data

Getting Started

Prerequisites

  • Go 1.21 or higher
  • Docker (optional)

Installation

  1. Clone the repository
git clone https://github.com/organization/go-api-template.git
cd go-api-template
  1. Install dependencies
go mod tidy
  1. Create a .env file
cp .env.example .env
  1. Run the application
go run main.go

Docker

Build the Docker image:

docker build -t demo-api .

Run the container:

docker run -p 8080:8080 demo-api

Testing

Test the endpoints:

curl http://localhost:8080/
curl http://localhost:8080/health
curl http://localhost:8080/docs

ArgoCD Deployment

This API is designed for demonstration purposes with ArgoCD running on OrbStack.

About

Repository for API, K8s and ArgoCD Config files

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages