2023-10-23 22:01:09 -04:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2023-11-03 20:00:14 -04:00
|
|
|
"log"
|
|
|
|
"net/http"
|
|
|
|
|
2023-10-28 17:50:44 -04:00
|
|
|
"git.preston-baxter.com/Preston_PLB/capstone/frontend-service/config"
|
2023-10-28 14:42:29 -04:00
|
|
|
"git.preston-baxter.com/Preston_PLB/capstone/frontend-service/controllers"
|
2023-10-23 22:01:09 -04:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2023-10-28 17:50:44 -04:00
|
|
|
config.Init()
|
2023-10-23 22:01:09 -04:00
|
|
|
r := gin.Default()
|
2023-10-28 12:34:11 -04:00
|
|
|
|
2023-10-28 14:42:29 -04:00
|
|
|
controllers.BuildRouter(r)
|
2023-10-28 12:34:11 -04:00
|
|
|
|
2023-11-03 20:00:14 -04:00
|
|
|
err := http.ListenAndServeTLS(":8080", "tls.crt", "tls.key", r)
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
2023-10-23 22:01:09 -04:00
|
|
|
}
|