Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goravel/fiber
Fiber driver for Goravel
https://github.com/goravel/fiber
fiber go gofiber
Last synced: 3 months ago
JSON representation
Fiber driver for Goravel
- Host: GitHub
- URL: https://github.com/goravel/fiber
- Owner: goravel
- License: mit
- Created: 2023-06-19T09:16:53.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-07T06:20:52.000Z (3 months ago)
- Last Synced: 2024-11-07T07:25:06.603Z (3 months ago)
- Topics: fiber, go, gofiber
- Language: Go
- Homepage:
- Size: 432 KB
- Stars: 8
- Watchers: 3
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-fiber - goravel/fiber - Laravel similar boilerplate with support for Fiber. (🚧 Boilerplates / 🌱 Third Party)
README
# Fiber
[![Doc](https://pkg.go.dev/badge/github.com/goravel/fiber)](https://pkg.go.dev/github.com/goravel/fiber)
[![Go](https://img.shields.io/github/go-mod/go-version/goravel/fiber)](https://go.dev/)
[![Release](https://img.shields.io/github/release/goravel/fiber.svg)](https://github.com/goravel/fiber/releases)
[![Test](https://github.com/goravel/fiber/actions/workflows/test.yml/badge.svg)](https://github.com/goravel/fiber/actions)
[![Report Card](https://goreportcard.com/badge/github.com/goravel/fiber)](https://goreportcard.com/report/github.com/goravel/fiber)
[![Codecov](https://codecov.io/gh/goravel/fiber/branch/master/graph/badge.svg)](https://codecov.io/gh/goravel/fiber)
![License](https://img.shields.io/github/license/goravel/fiber)Fiber http driver for Goravel.
## Version
| goravel/fiber | goravel/framework |
|---------------|-------------------|
| v1.2.x | v1.14.x |
| v1.1.x | v1.13.x |## Install
1. Add package
```
go get -u github.com/goravel/fiber
```2. Register service provider
```
// config/app.go
import "github.com/goravel/fiber""providers": []foundation.ServiceProvider{
...
&fiber.ServiceProvider{},
}
```3. Add fiber config to `config/http.go` file
```
// config/http.go
import (
fiberfacades "github.com/goravel/fiber/facades"
"github.com/gofiber/template/html/v2"
"github.com/gofiber/fiber/v2"
)"default": "fiber",
"drivers": map[string]any{
"fiber": map[string]any{
// prefork mode, see https://docs.gofiber.io/api/fiber/#config
"prefork": false,
// Optional, default is 4096 KB
"body_limit": 4096,
"header_limit": 4096,
"route": func() (route.Route, error) {
return fiberfacades.Route("fiber"), nil
},
// Optional, default is "html/template"
"template": func() (fiber.Views, error) {
return html.New("./resources/views", ".tmpl"), nil
},
},
},
```## Testing
Run command below to run test:
```
go test ./...
```