add root return
This commit is contained in:
@@ -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"})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user