Пример #1
0
func main() {
	router := handlers.NewRouter(storage.NewInMemoryDB())

	port := 8000
	serveString := ":" + strconv.Itoa(port)

	log.Printf("[INFO] Listening on %s", serveString)
	http.ListenAndServe(serveString, router)
}
Пример #2
0
func init() {
	allChartDB = storage.NewInMemoryDB()
	allChartRouter = NewRouter(allChartDB).(*mux.Router)
}
Пример #3
0
func init() {
	db = storage.NewInMemoryDB()
	chartRouter = NewRouter(db).(*mux.Router)
}