gofr-dev / gofr
- ΡΡΠ΅Π΄Π°, 16 Π°ΠΏΡΠ΅Π»Ρ 2025β―Π³. Π² 00:00:05
An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability.
GoFr is designed to simplify microservice development, with key focuses on Kubernetes deployment and out-of-the-box observability. While capable of building generic applications, microservices remain at its core.
To get started with GoFr, add the following import to your code and use Goβs module support to automatically fetch dependencies:
import "gofr.dev/pkg/gofr"Alternatively, use the command:
go get -u gofr.dev/pkg/gofrHere's a simple example to get a GoFr application up and running:
package main
import "gofr.dev/pkg/gofr"
func main() {
app := gofr.New()
app.GET("/greet", func(ctx *gofr.Context) (any, error) {
return "Hello World!", nil
})
app.Run() // listens and serves on localhost:8000
}To run this code:
$ go run main.goVisit localhost:8000/greet to see the result.
Explore a variety of ready-to-run examples in the GoFr examples directory.
Help us make GoFr even better:
To securely clone the GoFr repository, you can use HTTPS or SSH:
git clone https://github.com/gofr-dev/gofr.gitgit clone git@github.com:gofr-dev/gofr.gitIf your PR is merged, or if you contribute by writing articles or promoting GoFr, we invite you to fill out this form to claim your GoFr merchandise as a token of our appreciation!