GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - PiterWeb/Alf-Router: 🦌 Lightweight Router/Framework built on top of Fasthttp 📦

BranchesTags
Open more actions menu

Latest commit

 

History

88 Commits
88 Commits

Folders and files

NameName
Last commit message
Last commit date
errors
errors
 
 
plugins
plugins
 
 
utils
utils
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
License
License
 
 
README.md
README.md
 
 
core.go
core.go
 
 
core_test.go
core_test.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
headers.go
headers.go
 
 
methods.go
methods.go
 
 
methods_test.go
methods_test.go
 
 
middleware.go
middleware.go
 
 
routes.go
routes.go
 
 
routes_test.go
routes_test.go
 
 
types.go
types.go
 
 

Repository files navigation

🦌 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 📦:

  1. fasthttp (http ☁)
  2. ffjson (parse interfaces to json fast)
  3. pterm (show info, errors & warnings)

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 📌

  • Go 1.18

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

About

🦌 Lightweight Router/Framework built on top of Fasthttp 📦

pkg.go.dev/github.com/PiterWeb/Alf-Router

Topics

alfalf-routerapi-restfasthttpfasthttpapifasthttprouterflutter-apiframeworkgogo-apigolangmicroframeworkroutertemplate-engine

Resources

Readme
MIT license

Code of conduct

Code of conduct
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.