func main() { app.InitContex() defer app.GetContext().Destroy() api.EnsureIndexes() r := api.GetRouter() port := ":" + app.GetContext().Params.Port http.ListenAndServe(port, r) }
func init() { app.InitContex() // defer app.GetContext().Destroy() }