modified config file

This commit is contained in:
2021-07-22 13:04:25 +04:00
parent c3647c2fe7
commit 4e0fd09d73
10 changed files with 99 additions and 23 deletions

View File

@@ -122,7 +122,7 @@ func Server() error{
c.String(http.StatusOK, "success")
})
//Show images avaliable
//Show images available
r.GET("/ShowImages", func(c *gin.Context) {
resp, err := docker.ViewAllContainers()
if err != nil {
@@ -131,8 +131,14 @@ func Server() error{
c.JSON(http.StatusOK, resp)
})
//Port running on
err := r.Run(":8088")
//Get Server port based on the config file
config, err := config.ConfigInit()
if err != nil {
return err
}
// Run gin server on the specified port
err = r.Run(":" + config.ServerPort)
if err != nil {
return err
}