Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

juliankoehn/enlight

Repository files navigation

Enlight HTTP Router

Golang HTTP Router with valyala/fasthttp

router.go and tree.go are mostly based upon (julienschmidt/httprouter)[https://github.com/julienschmidt/httprouter]

Feature Overview

  • Optimized HTTP router which smartly prioritize routes
  • Build robust and scalable RESTful APIs
  • Extensible middleware framework
  • Define middleware at root or route level
  • Centralized HTTP error handling

Example

package main

import (
    "github.com/juliankoehn/enlight"
)

func main() {
    e := enlight.New()

    e.Use(middleware.Recover)

    // Routes
    e.GET("/", helloWorldHandler)

    e.Start(":8080")
}

func helloWorldHandler(c enlight.Context) error {
    return c.String(200, "Hello, World!")
}

TODO

  • Route based middleware

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages