43 lines
810 B
Go
43 lines
810 B
Go
// Golang Microservice API
|
|
//
|
|
// Example Swagger spec.
|
|
//
|
|
// Schemes: [http, https]
|
|
// BasePath: /
|
|
// Version: 0.0.1
|
|
// Contact: Matthias Sommer<admin@matthiassommer.it>
|
|
//
|
|
// Consumes:
|
|
// - application/json
|
|
//
|
|
// Produces:
|
|
// - application/json
|
|
//
|
|
// SecurityDefinitions:
|
|
// api_key:
|
|
// type: apiKey
|
|
// name: Authorization
|
|
// in: header
|
|
// swagger:meta
|
|
package main
|
|
|
|
import (
|
|
"git.umbach.dev/app-idea/rest-api/routers/config"
|
|
"git.umbach.dev/app-idea/rest-api/routers/database"
|
|
"git.umbach.dev/app-idea/rest-api/routers/router"
|
|
|
|
_ "github.com/go-sql-driver/mysql"
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func main() {
|
|
app := fiber.New()
|
|
|
|
router.SetupRoutes(app)
|
|
|
|
config.LoadConfig()
|
|
database.InitDatabase()
|
|
|
|
app.Listen(config.GetConfig().Server.Host)
|
|
}
|