From e72342b0027752dc93e57ebec99c4eb9a8aa8efe Mon Sep 17 00:00:00 2001 From: Keuin Date: Sat, 29 Jul 2023 12:10:43 +0800 Subject: wip --- api/server.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 api/server.go (limited to 'api/server.go') diff --git a/api/server.go b/api/server.go new file mode 100644 index 0000000..4cfe8f4 --- /dev/null +++ b/api/server.go @@ -0,0 +1,16 @@ +package api + +import ( + "github.com/gofiber/fiber/v2" + "github.com/keuin/slbr/logging" +) + +func StartServer(logger logging.Logger, addr string) error { + app := fiber.New() + + app.Get("/", func(c *fiber.Ctx) error { + return c.SendString("Hello, World!") + }) + + return app.Listen(addr) +} -- cgit v1.2.3