Created
April 15, 2022 09:13
-
-
Save Develp10/abd9f5454c7e44fe1109fc7dbfe3df02 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"go-fiber-api-docker/pkg/common/config" | |
"go-fiber-api-docker/pkg/common/db" | |
"go-fiber-api-docker/pkg/products" | |
"github.com/gofiber/fiber/v2" | |
) | |
func main() { | |
c, err := config.LoadConfig() | |
if err != nil { | |
log.Fatalln("Failed at config", err) | |
} | |
h := db.Init(&c) | |
app := fiber.New() | |
products.RegisterRoutes(app, h) | |
app.Listen(c.Port) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment