mirror of
https://github.com/trafficlunar/api.git
synced 2026-06-27 22:24:08 +00:00
feat: add basic websocket
This commit is contained in:
parent
404b9a937e
commit
47b757769a
2 changed files with 38 additions and 0 deletions
|
|
@ -38,9 +38,12 @@ func NewRouter() {
|
|||
|
||||
r.Get("/visit-counter", handler.HandleGetVisitCounter)
|
||||
r.With(httprate.LimitByRealIP(1, time.Hour)).Patch("/visit-counter", handler.HandlePatchVisitCounter)
|
||||
|
||||
r.Get("/currently-playing", handler.HandleGetCurrentlyPlaying)
|
||||
r.Get("/status", handler.HandleGetStatus)
|
||||
|
||||
r.Get("/ws/computer", handler.HandleComputerWebsocket)
|
||||
|
||||
port := os.Getenv("PORT")
|
||||
if len(port) == 0 {
|
||||
port = "8080"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue