Getting Started
Ada is a simple, flexible Go web framework for building web applications with its own mux and middleware set.
Installation
sh
go get github.com/rakunlabs/adaRequirements
Ada requires Go 1.27 or newer, matching the go directive in its go.mod.
Simple Start
go
package main
import (
"net/http"
"github.com/rakunlabs/ada"
)
func main() {
server := ada.New()
server.GET("/hello/{user}", SayHello)
server.Start(":8080")
}
// /////////////////////
func SayHello(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello, " + r.PathValue("user")))
}sh
curl http://localhost:8080/hello/ada
# Hello, adaNext Steps
- Start Server — graceful shutdown and server options
- Routing — path parameters, wildcards, and groups
- Middleware — the bundled middleware set
- Microservice — a recommended middleware stack