add root return

This commit is contained in:
Lectom C Han
2025-12-05 17:52:08 +09:00
parent 5d0221f67d
commit fa1a7a057e

View File

@@ -28,6 +28,16 @@ func main() {
DisableStartupMessage: true,
})
app.Get("/", func(c *fiber.Ctx) error {
return c.JSON(fiber.Map{
"service": "geoip-rest",
"endpoints": []string{
"/health",
"/lookup?ip=<IPv4|IPv6>",
},
})
})
app.Get("/health", func(c *fiber.Ctx) error {
return c.JSON(fiber.Map{"status": "ok"})
})