main.go 503 B

123456789101112131415161718192021222324
  1. // API doc: https://wiki.summercamp.local/display/PIN/Pinguin+server+API
  2. package main
  3. import (
  4. "time"
  5. "math/rand"
  6. "log"
  7. "net/http"
  8. extStomp "github.com/go-stomp/stomp"
  9. "battlecamp-go-server/games"
  10. "battlecamp-go-server/stomp"
  11. )
  12. var currentGames games.GameServer = games.New()
  13. var stompConnection *extStomp.Conn
  14. func main() {
  15. rand.Seed(time.Now().UnixNano())
  16. stompConnection = stomp.DailStomp()
  17. defer stompConnection.Disconnect()
  18. log.Fatal(http.ListenAndServe(":8080", newUrlRouter()))
  19. }