1
0
Fork 0
forked from boyska/feedpanel
feedpanel/cmd/userpanel/main.go

19 lines
398 B
Go
Raw Normal View History

2018-09-30 11:06:46 +02:00
package main
import (
"fmt"
"net/http"
2018-09-30 14:05:25 +02:00
"git.lattuga.net/boyska/feedpanel/panelui"
2018-09-30 14:05:25 +02:00
"github.com/urfave/negroni"
2018-09-30 11:06:46 +02:00
)
func main() {
ha := panelui.HeaderAuth{AllowedNames: []string{"feedati-fe"}, RequireUser: true}
2018-09-30 14:05:25 +02:00
n := negroni.New(negroni.NewRecovery(), negroni.NewLogger(), ha)
n.UseHandler(panelui.GetMux())
2018-09-30 14:05:25 +02:00
addr := ":8000"
fmt.Println("Listening on", addr)
http.ListenAndServe(addr, n)
2018-09-30 11:06:46 +02:00
}