-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
28 lines (24 loc) · 702 Bytes
/
Copy pathmain.go
File metadata and controls
28 lines (24 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"github.com/gofiber/fiber/v2"
"github.com/joho/godotenv"
"www.github.com/biskitsx/go-api/webapp-sample/config"
"www.github.com/biskitsx/go-api/webapp-sample/db"
_ "www.github.com/biskitsx/go-api/webapp-sample/docs"
_ "www.github.com/biskitsx/go-api/webapp-sample/model"
_ "www.github.com/biskitsx/go-api/webapp-sample/model/dto"
"www.github.com/biskitsx/go-api/webapp-sample/router"
)
// @title Swagger Example API
// @version 1.0
// @description A API for fiber framework
// @host localhost:3000/api
func main() {
app := fiber.New(fiber.Config{
ErrorHandler: config.CustomErrorHandler,
})
godotenv.Load()
db.ConnectDb()
router.Init(app)
app.Listen(":3000")
}