Пример #1
0
func init() {

	settings.SetPreproductionEnv()
	GlobalRepStore = &RepStore{ConnectToMongoCol()}

	populateMongoCol(GlobalRepStore.Col)
}
Пример #2
0
func init() {

	settings.SetPreproductionEnv()
	GlobalAnswerStore = &AnswerStore{ConnectToPostgres()}

	dropPostgresTables(GlobalAnswerStore.DB)
	initializePostgres(GlobalAnswerStore.DB)
	populatePostgres(GlobalAnswerStore.DB)

}
Пример #3
0
func main() {

	settings.SetPreproductionEnv() // Set GO_ENV to "preproduction"

	db := datastores.ConnectToPostgres()

	ac := auth.NewAuthContext(&datastores.JWTStore{datastores.ConnectToRedis()})
	c := &m.Context{ac, &datastores.RepStore{datastores.ConnectToMongoCol()}, nil}

	r := handlers.AssignHandlersToRoutes(c, db)
	http.Handle("/", &Server{r})

	fmt.Println("Listening on port 3030")
	http.ListenAndServe(":3030", nil)
}
Пример #4
0
func init() {
	settings.SetPreproductionEnv()
	GlobalQuestionStore = &QuestionStore{ConnectToPostgres()}
}
Пример #5
0
func init() {
	settings.SetPreproductionEnv()
	GlobalUserStore = &UserStore{DB: ConnectToPostgres()}

}
Пример #6
0
func init() {
	settings.SetPreproductionEnv()
}
Пример #7
0
func init() {
	settings.SetPreproductionEnv()
	GlobalTokenStore = &JWTStore{ConnectToRedis()}
}