refactor: general-node and map-node to use flotte types for service registration

This commit is contained in:
2025-02-11 15:17:34 +01:00
parent eec969fc75
commit 88caecde51
8 changed files with 146 additions and 28 deletions

View File

@@ -1,24 +1,12 @@
package generalnode
import "github.com/gin-gonic/gin"
import (
"github.com/gin-gonic/gin"
)
func Start() {
router := gin.Default()
// Get Status
router.GET("/status", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "pong",
})
})
// Add Service
router.POST("/service", func(c *gin.Context) {
c.JSON(200, gin.H{
"serviceName": "service1",
"status": "registered",
})
})
router = registerRoutes(router)
router.Run("localhost:8000") // listen and serve on 0.0.0.0:8000
}