Compare commits
1 commit
0a4245b094
...
9357ab1520
Author | SHA1 | Date | |
---|---|---|---|
9357ab1520 |
1 changed files with 3 additions and 3 deletions
6
main.go
6
main.go
|
@ -41,12 +41,12 @@ func main() {
|
|||
staticHandler := http.FileServer(http.Dir("./static"))
|
||||
// parse templates
|
||||
if err = templating.InitTemplates(); err != nil {
|
||||
log.Print(err.Error())
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
// database connection
|
||||
db, err := sqldb.Connect(conf)
|
||||
if err != nil {
|
||||
log.Print(err.Error())
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
// Create repos
|
||||
roomRepo := repositories.NewRoomRepo(db)
|
||||
|
@ -65,5 +65,5 @@ func main() {
|
|||
http.Handle("/static/", http.StripPrefix("/static/", staticHandler))
|
||||
|
||||
err = http.ListenAndServe(fmt.Sprintf("%s:%d", conf.Server.ListenAddress, conf.Server.ListenPort), nil)
|
||||
log.Println(err.Error())
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue