diff options
author | Keuin <[email protected]> | 2023-07-29 12:10:43 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-07-29 20:47:11 +0800 |
commit | e72342b0027752dc93e57ebec99c4eb9a8aa8efe (patch) | |
tree | 9c5ebe527e54a0d2f6430c37762137e1ca59f5a3 /api/server.go | |
parent | 7a8f91d2297d5f43378a5f181ae34aaef6a82367 (diff) |
wip
Diffstat (limited to 'api/server.go')
-rw-r--r-- | api/server.go | 16 |
1 files changed, 16 insertions, 0 deletions
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) +} |