Added configuration

This commit is contained in:
2025-09-21 14:30:33 +01:00
parent 2c92ee61a0
commit d9d64cb067
5 changed files with 70 additions and 4 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ import (
"net/http"
"strconv"
"github.com/ESilva15/PTInvCertSWDB/config"
sw "github.com/ESilva15/PTInvCertSWDB/sw"
"github.com/gin-gonic/gin"
@@ -48,6 +49,7 @@ func count(c *gin.Context) {
}
func RunServer() error {
cfg := config.GetInstance()
gin.SetMode(ginMode)
router := gin.Default()
@@ -64,7 +66,7 @@ func RunServer() error {
return err
}
err = router.Run(":8086")
err = router.Run(":" + cfg.Port)
if err != nil {
return err
}