Skip to content

Commit

Permalink
fix: 修改绑定端口不生效
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Jul 21, 2024
1 parent be40c11 commit 1fd3945
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/core/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package core
import (
"time"

viper "github.com/spf13/viper"

"github.com/RockChinQ/Campux/backend/controller"
"github.com/RockChinQ/Campux/backend/database"
"github.com/RockChinQ/Campux/backend/mq"
Expand Down Expand Up @@ -80,5 +82,8 @@ func ScheduleRoutines(
}

func (a *Application) Run() {
a.API.R.Run()

a.API.R.Run(
viper.GetString("backend.host") + ":" + viper.GetString("backend.port"),
)
}

0 comments on commit 1fd3945

Please sign in to comment.