← All open source projects

Fiber

gofiber/fiber

Fiber is a Go web framework inspired by Express and built on top of FastHTTP.

Forks 1,998
Author gofiber
Language Go
License MIT
Synced 2026-06-27

What it is

Fiber is a Go web framework inspired by Express from the Node.js world. It is built on FastHTTP and focuses on speed, low overhead, and concise server code.

It fits APIs, microservices, small web apps, and services where Go is already chosen but developers want a convenient layer around HTTP, middleware, and routes.

How the approach works

Fiber provides an app, routes, groups, middleware, handlers, and request context. The style is close to Express: `app.Get`, `app.Post`, `ctx.JSON`, `ctx.Params`, `ctx.Next`.

The important detail is FastHTTP rather than the standard `net/http`, which helps performance but creates compatibility limits.

Minimal handler

This Go-like fragment is shown as plain text. It demonstrates Fiber routes and JSON response style.

Language: Plain text
app := fiber.New()

app.Get("/projects/:slug", func(c *fiber.Ctx) error {
    slug := c.Params("slug")
    return c.JSON(fiber.Map{"slug": slug})
})

app.Listen(":3000")

What is inside

The repository contains the framework, documentation, middleware, examples, tests, and material about project philosophy.

Fiber is especially approachable for developers moving from Express to Go and wanting concise route code.

Practical context

Fiber should be chosen deliberately. If a project depends heavily on `net/http`-compatible libraries, integrations need checking.

For fast APIs with simple routes, Fiber can be very pleasant. For maximum standard Go compatibility, `net/http` or compatible frameworks may fit better.

Why Go developers choose it

Fiber is attractive to Go developers who like the minimalist Express style. Routes, middleware, groups, and handlers feel familiar, while fasthttp underneath gives the project a strong focus on speed.

It fits APIs, small services, proxy layers, and applications where simple routing and high throughput matter. A team can build a server quickly without heavy architectural scaffolding.

The important compromise is that Fiber is not a direct layer over the standard net/http package. That helps performance, but some familiar libraries and middleware from the net/http world need adaptation.

Fiber is strongest when the stack is chosen deliberately for a new service. If a project is already deeply tied to Go’s standard library and existing handlers, migration deserves a closer look.

Another practical advantage is the clear handler shape. In a small service, the route, parameters, response, and error handling stay close together, so the code remains readable without a long chain of internal abstractions.

Strengths and limits

The strength is speed and the familiar Express-like model. The limit is FastHTTP compatibility boundaries.