Esempio n. 1
0
func main() {
	models.Init()

	r := mux.NewRouter()

	http.Handle("/", session.Middleware(r))
	s := r.PathPrefix("/api").Subrouter()
	api.Route(s)

	r.PathPrefix("/").Handler(http.FileServer(http.Dir("public/")))

	http.ListenAndServe(":8000", nil)
}
Esempio n. 2
0
func init() {
	models.Init()
}
Esempio n. 3
0
func init() {
	models.Init()
	mTransaction = mux.NewRouter()
	s := mTransaction.PathPrefix("/api").Subrouter()
	api.Route(s)
}
Esempio n. 4
0
func init() {
	models.Init()
	m = mux.NewRouter()
	s := m.PathPrefix("/api").Subrouter()
	api.Route(s)
}