Merge remote-tracking branch 'origin/main' into styling
This commit is contained in:
commit
961a10915b
13 changed files with 193 additions and 74 deletions
10
main.go
10
main.go
|
@ -19,6 +19,11 @@ func main() {
|
|||
if e == nil {
|
||||
log.SetOutput(logwriter)
|
||||
}
|
||||
|
||||
if controllers.TemplateError != nil {
|
||||
log.Fatalf("Error parsing templates: %s", controllers.TemplateError.Error())
|
||||
}
|
||||
|
||||
configFile := flag.String(
|
||||
"config",
|
||||
"config/config.json",
|
||||
|
@ -38,7 +43,10 @@ func main() {
|
|||
// serve static files
|
||||
staticHandler := http.FileServer(http.Dir("./static"))
|
||||
|
||||
db := sqldb.Connect(conf)
|
||||
db, err := sqldb.Connect(conf)
|
||||
if err != nil {
|
||||
log.Fatalf(err.Error())
|
||||
}
|
||||
// Create repos
|
||||
roomRepo := repositories.NewRoomRepo(db)
|
||||
courseRepo := repositories.NewCourseRepo(db)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue