Skip to content

gotokatsuya/nue

Repository files navigation

Nue - 鵺

Nue is a lightweight high performance HTTP request router for Golang.

Build status

wercker status

Installation

$ go get github.com/gotokatsuya/nue

Usage

package main

import (
	"net/http"
	
	"github.com/gotokatsuya/nue"
)

func main() {
	handler := nue.New()
	handler.AddHandler("/hello", "/world", func(rw http.ResponseWriter, r *http.Request) {
		rw.Write([]byte("hello world"))
	})
	handler.AddNotFoundHandler(func(rw http.ResponseWriter, r *http.Request) {
		rw.Write([]byte("Not found route."))
	})
	http.ListenAndServe(":8080", handler)
}

About

Nue is a lightweight high performance HTTP request router for Golang.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published