aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/codegangsta/negroni/doc.go
blob: add1ed9f713bd35ba4cb297a3b678ad43dd249af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Package negroni is an idiomatic approach to web middleware in Go. It is tiny, non-intrusive, and encourages use of net/http Handlers.
//
// If you like the idea of Martini, but you think it contains too much magic, then Negroni is a great fit.
//
// For a full guide visit http://github.com/urfave/negroni
//
//  package main
//
//  import (
//    "github.com/urfave/negroni"
//    "net/http"
//    "fmt"
//  )
//
//  func main() {
//    mux := http.NewServeMux()
//    mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
//      fmt.Fprintf(w, "Welcome to the home page!")
//    })
//
//    n := negroni.Classic()
//    n.UseHandler(mux)
//    n.Run(":3000")
//  }
package negroni