Go HTTP API

A Go API on net/http with no framework, structured JSON logs, a health check and a graceful shutdown when a new deploy replaces it. Click Deploy and Naijacloud compiles it from the public repo and gives you a live HTTPS address. No GitHub connection needed.

Go

What's inside

  • Go 1.22 net/http routing, no framework
  • Structured JSON logs through log/slog
  • /healthz, /api/time and /api/hello/<name>
  • A graceful shutdown on SIGTERM, so a redeploy drops no requests

What you get after deploying

  • A live address at https://go-api.naijacloud.app with HTTPS
  • Build and runtime logs, metrics and redeploys from the dashboard

Environment variables

You can change any of these on the deploy screen.

LOG_LEVELdebug, info, warn or errorinfo

Run it locally

$ git clone https://github.com/naijacloud/template-go-api
$ cd template-go-api
$ go run .
Learn how it worksDeploy a web service

Whatever you build it with, it ships here.

Deploy your app for free

Free tier forever · No card