refactor(app port): changed to have the port be dyncamic on the iis side
docker will default to 8080 and can be adjusted via the docker compose, or passing the same env over it will change it as well.
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/joho/godotenv"
|
||||
"lst.net/cmd/services/logging"
|
||||
"lst.net/cmd/services/system/config"
|
||||
_ "lst.net/docs"
|
||||
"lst.net/utils/db"
|
||||
)
|
||||
@@ -110,10 +111,16 @@ func main() {
|
||||
})
|
||||
|
||||
logging.RegisterLoggerRoutes(r, basePath)
|
||||
config.RegisterConfigRoutes(r, basePath)
|
||||
|
||||
r.Any(basePath+"/api", errorApiLoc)
|
||||
|
||||
r.Run(":8080")
|
||||
// get the server port
|
||||
port := "8080"
|
||||
if os.Getenv("VITE_SERVER_PORT") != "" {
|
||||
port = os.Getenv("VITE_SERVER_PORT")
|
||||
}
|
||||
r.Run(":" + port)
|
||||
}
|
||||
|
||||
// func serveViteApp(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user