Listed in the CNCF Landscape
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.
- Simple API Syntax
- REST Standards by Default
- Configuration Management
- Observability (Logs, Traces, Metrics)
- Inbuilt Auth Middleware & Custom Middleware Support
- gRPC Support
- HTTP Service with Circuit Breaker Support
- Pub/Sub
- Health Check for All Datasources
- Database Migration
- Cron Jobs
- Support for Changing Log Level Without Restarting
- Swagger Rendering
- Abstracted File Systems
- Websockets
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/gofr
Here'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
}