A fast web framework for Go.
- Go 100%
| .vscode | ||
| example | ||
| extra | ||
| .gitignore | ||
| app.go | ||
| app_test.go | ||
| bind.go | ||
| bind_test.go | ||
| bodies.go | ||
| bodies_test.go | ||
| config.go | ||
| config_test.go | ||
| constants.go | ||
| Contributing.md | ||
| cookie.go | ||
| ctx.go | ||
| ctx_test.go | ||
| errors.go | ||
| errors_test.go | ||
| fire_test.go | ||
| go.mod | ||
| go.sum | ||
| group.go | ||
| group_test.go | ||
| handler.go | ||
| License.txt | ||
| logger.go | ||
| path.go | ||
| Readme.md | ||
| redirect.go | ||
| redirect_test.go | ||
| renderer.go | ||
| route.go | ||
| route_params.go | ||
| router.go | ||
| Security.md | ||
| types.go | ||
| unsafe.go | ||
🔥 Fire
Fire is a fast web framework for Go, similar in its API to Fiber. In fact, it's almost a complete drop-in replacement for Fiber v3.
This is still in a very early stage of development: it is not at all production ready. Contributions are welcome. Expect improvements over the coming months.
Installing
Note that there are no tagged releases yet, so if you would like to try out Fire, please use our main branch:
go get -u codeberg.org/gofire/fire@main
Usage
func main() {
app := fire.New()
app.Get("/", func(c fire.Ctx) error {
return c.JSON(fire.Map{
"hello": "world",
})
})
app.Listen(":8080")
}
Relation to Fiber
The only relation to Fiber in this project is its overall API, with some differences:
Ctx.Set()becomesCtx.SetHeader()Ctx.Get()becomesCtx.Header()Ctx.Get(fiber.HeaderUserAgent)can be done viaCtx.UserAgent()Ctx.Set()withContent-Typeis simplified toCtx.SetContentType()Ctx.Status()becomesCtx.WithStatus()Ctx.Params()becomesCtx.Param()Ctx.Locals()becomesCtx.Local()andCtx.SetLocal()fiber.Locals[T]()becomesfire.Local[T]()Ctx.RequestCtx()becomesCtx.Context()
There's also some additional features, such as the github.com/SeraphSecure/bodies/v3 package integrated directly into Fire as fire.ParseModValidate[T] and derivatives.