basic main for testing
This commit is contained in:
parent
58e6e866b8
commit
57fb632446
1
go.mod
1
go.mod
@ -3,6 +3,7 @@ module git.sunturtle.xyz/studio/shotgun
|
||||
go 1.21.6
|
||||
|
||||
require (
|
||||
github.com/go-chi/chi/v5 v5.0.11
|
||||
github.com/google/uuid v1.5.0
|
||||
nhooyr.io/websocket v1.8.10
|
||||
)
|
||||
|
2
go.sum
2
go.sum
@ -1,3 +1,5 @@
|
||||
github.com/go-chi/chi/v5 v5.0.11 h1:BnpYbFZ3T3S1WMpD79r7R5ThWX40TaFB7L31Y8xqSwA=
|
||||
github.com/go-chi/chi/v5 v5.0.11/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
||||
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
|
||||
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q=
|
||||
|
19
main.go
Normal file
19
main.go
Normal file
@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
|
||||
"git.sunturtle.xyz/studio/shotgun/lobby"
|
||||
"git.sunturtle.xyz/studio/shotgun/serve"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := Server{
|
||||
l: lobby.New(),
|
||||
}
|
||||
r := chi.NewRouter()
|
||||
r.With(serve.WithPlayerID).Get("/queue", s.Queue)
|
||||
http.ListenAndServe(":8080", r)
|
||||
}
|
Loading…
Reference in New Issue
Block a user