modulepackage
0.0.0-20240104213556-8d3c2691da6e
Repository: https://github.com/piterweb/alf-router.git
Documentation: pkg.go.dev
# README
š¦ ALF (API Like Flutter) Router
š“ This library is actually well tested but the API may change with the time introducing breaking changes
Description
š This is a micro-framework / router built on ⬠top of the fasthttp package. Alf relies on scalability and his simple structure wich is similar to Flutter projects š“
⨠Inspired by Flutter & Fiber
Purpouse
š·āāļø Make a router to start faster and simpler my backend projects
š Learn
- Explore the fasthttp package ā
- Publish my own package š¦
- Learn more deeply how a web server works š
Technologies used š
- Go (Golang)
Core External Packages š¦:
Features :
- Fast Router šØ
- Concurrent Route Setup ā
- Send JSON Responses (docs)
- HTML/Go Templates Out of the BOX ⨠(docs)
- Plugins š§© :
- Generate Types for TS (tygo pkg) (docs)
Docs
Prerequisites š
Set up your first project š»
Download the package ā¬
go get github.com/PiterWeb/Alf-Router
Import it into your code š
import (
alf "github.com/PiterWeb/Alf-Router"
)
Write this simple structure
err := alf.App(&alf.AppConfig{
Port: "3000",
Routes: alf.CreateRouter([]alf.Route{
{
Path: "/",
Handle: func(ctx *alf.Ctx) error {
_, err := ctx.WriteString("Hello World")
return err
},
Method: "get",
},
}),
})
if err != nil {
panic(err)
}
Now you have setup šØ an index route
# Interfaces
No description provided by the author