Example #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)
}
func init() {
	allChartDB = storage.NewInMemoryDB()
	allChartRouter = NewRouter(allChartDB).(*mux.Router)
}
Example #3
0
func init() {
	db = storage.NewInMemoryDB()
	chartRouter = NewRouter(db).(*mux.Router)
}