gobase
gobase is a web framework with basic settings and structure, wrapping fiber.
Installation
go get github.com/cancue/gobase
Example
package main
import (
"github.com/cancue/gobase"
"github.com/cancue/gobase/config"
"github.com/gofiber/fiber/v2"
)
func main() {
config := config.Config{
Stage: "local",
Name: "gobase",
Domain: "localhost",
Port: 3000,
AllowOrigins: []string{"http://localhost:3000"},
}
gobase.Start(&config, router)
}
func router(app *fiber.App) {
app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendString("Hello, World 👋!")
})
}
Demo
gobase-demo
License
MIT