DEV Community

SREEPATHI B
SREEPATHI B

Posted on

GoFr: The Go Framework That Makes Microservices Actually Fun

I've been exploring Go frameworks lately and stumbled across GoFr.
Honestly, it's one of those tools that makes you wonder why you
were doing things the hard way before.

The Problem It Solves

Building microservices in Go usually means spending the first few
hours just wiring things up — logging, tracing, database connections,
health checks. You haven't written a single line of actual business
logic yet and you're already tired.

GoFr fixes this by giving you all of that out of the box.

What You Get

The framework comes with logging, tracing and metrics built in.
Database migrations, health checks, gRPC support, Pub/Sub, cron jobs,
WebSockets and Swagger rendering are all included without any extra
setup.

Getting Started

It takes about two minutes to get something running:

go get -u gofr.dev/pkg/gofr

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

Visit localhost:8000/greet and it just works.

My Take

Worth checking out if you're building anything in Go. The project
is open source and actively maintained by the team at gofr-dev.
You can find it on GitHub at https://github.com/gofr-dev/gofr
and the full documentation is at https://gofr.dev.

If you want to contribute, they have a welcoming community and
a detailed contributing guide as well.

Top comments (0)