DEV Community

Suhail M
Suhail M

Posted on

Getting Started with GoFr: A Highly Observable Go Framework

GoFr is an excellent, opinionated open-source GoLang framework built specifically to streamline the development of production-ready microservices.

What makes GoFr standout?

Out-of-the-box Observability : It automatically tracks structured JSON logs, OpenTelemetry traces, and Prometheus metrics without forcing you to write lines of custom boilerplate code.

Built-in Features: Includes native support for gRPC, REST standards, database migrations, configuration management, and zero-config health checks perfect for Kubernetes deployments.

Quick "Hello World" Service

Setting up a microservice requires minimal code setup:


go
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() 
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)