make json abstraction for server

This commit is contained in:
Adrian Zuercher
2025-04-15 11:04:14 +02:00
parent 3d1dee25f1
commit a1f947e24a
6 changed files with 149 additions and 130 deletions

13
server/routes.go Normal file
View File

@@ -0,0 +1,13 @@
package server
import "github.com/gin-gonic/gin"
func (s *Server) AddRoutes() {
s.engine.GET("/json_data", func(c *gin.Context) {
handleWebSocket(c.Writer, c.Request)
})
s.engine.GET("/", func(c *gin.Context) {
c.String(200, "WebSocket Broadcast Server is running!")
})
}