2018-09-30 11:06:46 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net/http"
|
2018-09-30 14:05:25 +02:00
|
|
|
|
2018-10-04 17:53:30 +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() {
|
2018-10-04 17:53:30 +02:00
|
|
|
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)
|
2018-10-04 17:53:30 +02:00
|
|
|
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
|
|
|
}
|