27 lines
444 B
Go
Executable File
27 lines
444 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"local/game-show/questions/config"
|
|
"local/game-show/questions/server"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
err := config.New()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
server, err := server.New()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if err := server.Routes(); err != nil {
|
|
panic(err)
|
|
}
|
|
log.Printf("Listening on %s", config.Get().Addr)
|
|
if err := http.ListenAndServe(config.Get().Addr, server); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|