Пример #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)
}
Пример #2
0
func init() {
	models.Init()
}
Пример #3
0
func init() {
	models.Init()
	mTransaction = mux.NewRouter()
	s := mTransaction.PathPrefix("/api").Subrouter()
	api.Route(s)
}
Пример #4
0
func init() {
	models.Init()
	m = mux.NewRouter()
	s := m.PathPrefix("/api").Subrouter()
	api.Route(s)
}