reorg
This commit is contained in:
25
main.go
Normal file
25
main.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"local/sandbox/cards/src/config"
|
||||
"local/sandbox/cards/src/game"
|
||||
"local/sandbox/cards/src/server"
|
||||
"local/sandbox/cards/src/storage"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
config := config.NewConfig()
|
||||
storage := storage.NewStorage(config)
|
||||
gm := game.NewMaster(config, storage)
|
||||
server := server.NewServer(config, gm)
|
||||
if err := server.Routes(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
log.Println(config)
|
||||
if err := http.ListenAndServe(fmt.Sprintf(":%d", config.Server.Port), server); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user