Ejemplo n.º 1
0
func init() {

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

	populateMongoCol(GlobalRepStore.Col)
}
Ejemplo n.º 2
0
func init() {

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

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

}
Ejemplo n.º 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)
}
Ejemplo n.º 4
0
func init() {
	settings.SetPreproductionEnv()
	GlobalQuestionStore = &QuestionStore{ConnectToPostgres()}
}
Ejemplo n.º 5
0
func init() {
	settings.SetPreproductionEnv()
	GlobalUserStore = &UserStore{DB: ConnectToPostgres()}

}
Ejemplo n.º 6
0
func init() {
	settings.SetPreproductionEnv()
}
Ejemplo n.º 7
0
func init() {
	settings.SetPreproductionEnv()
	GlobalTokenStore = &JWTStore{ConnectToRedis()}
}