-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
36 lines (29 loc) · 818 Bytes
/
main.go
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
29
30
31
32
33
34
35
36
package main
import (
"fmt"
"log"
"github.com/msanvarov/gin-rest-prisma-boilerplate/config"
"github.com/msanvarov/gin-rest-prisma-boilerplate/router"
)
// @title API
// @version 1.0
// @description Simple API
// @contact.name API Support
// @contact.url https://msanvarov.github.io/personal-portfolio/
// @contact.email [email protected]
// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
// @host localhost:9000
// @basepath /
// Main method to act as a starting point for the web server.
func main() {
config.Configure("config")
yaml := config.GetConfiguration()
port := yaml.GetString("server.port")
routing := router.Router(yaml)
fmt.Printf("🚀 Preparing to listen on port %s\n", port)
err := routing.Run(port)
if err != nil {
log.Fatal(err)
}
}