예제 #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()}
}