refactor: use core.port

This commit is contained in:
Derrick Hammer 2024-01-12 09:17:26 -05:00
parent 4d75f5659c
commit fecc99b081
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
"net/http"
"strconv"
)
var (
@ -48,7 +49,7 @@ func (p *PortalImpl) Run() {
p.logger.Fatal("Failed to start", zap.Error(err))
}
}
p.logger.Fatal("HTTP server stopped", zap.Error(http.ListenAndServe(":8080", p.apiRegistry.Router())))
p.logger.Fatal("HTTP server stopped", zap.Error(http.ListenAndServe(":"+strconv.FormatUint(uint64(p.Config().GetUint("core.port")), 10), p.apiRegistry.Router())))
}
func (p *PortalImpl) Config() *viper.Viper {