A small Fiber v2 API starter in Go 1.25, running on the fasthttp engine, for developers who like Express-style routing in Go. It includes a JSON root route, a health check, a slog request logger, panic recovery, graceful shutdown and in-memory route tests.
by Light CloudREST APIs
Fiber is built on fasthttp rather than net/http, so handlers take a *fiber.Ctx, and the template's request logger is a short Fiber handler instead of a net/http wrapper. Keeping fiber.New, middleware and routes in internal/server/server.go means a new endpoint is one handler in handlers.go plus one app.Get line. Light Cloud builds the module, runs it as a container listening on PORT, and redeploys on each push to your copy.
Write a handler with the signature func(c *fiber.Ctx) error in internal/server/handlers.go and register it in server.New, for example app.Get("/items/:id", getItem). Read the value with c.Params("id") and reply with return c.JSON(item).
Not directly, because Fiber runs on fasthttp. Use Fiber's own middleware under github.com/gofiber/fiber/v2/middleware, or the adaptor package, and copy any value from *fiber.Ctx you need after the handler returns, since Fiber reuses it.
Import github.com/gofiber/fiber/v2/middleware/cors and add app.Use(cors.New()) in server.New, next to the recover middleware the template already uses.
Yes. make build writes a static binary to bin/server; run it with PORT set on any server or copy it into a minimal container image.
Pick Fiber if you want Express-style handlers and fasthttp; pick Echo if you want to stay on net/http and its middleware ecosystem. Both starters have the same routes, logging and shutdown, so the code is easy to compare.
Start a Go API on Echo with request logs, error handling and graceful shutdown in place
Start a Go CRUD API on PostgreSQL with Gin, pgx, input validation and route tests
Start a Node.js REST API with Express, CORS, JSON errors and tests already wired up