refactor server to support variable options

This commit is contained in:
Hayden 2022-10-03 15:43:36 -08:00
parent 245591cb23
commit 1143246816
6 changed files with 89 additions and 21 deletions

View file

@ -119,7 +119,11 @@ func run(cfg *config.Config) error {
// =========================================================================
// Start Server
app.server = server.NewServer(app.conf.Web.Host, app.conf.Web.Port)
app.server = server.NewServer(
server.WithHost(app.conf.Web.Host),
server.WithPort(app.conf.Web.Port),
)
routes := app.newRouter(app.repos)
if app.conf.Mode != config.ModeDevelopment {