diff options
author | 2022-11-02 16:31:43 +0100 | |
---|---|---|
committer | 2022-11-02 16:31:43 +0100 | |
commit | c4c713988a62c2ca1ea92778f2cebbfd483c98f1 (patch) | |
tree | 0e29b53992a452559f221df698fa2e1d5aa1ce1b /testrig/router.go | |
parent | [chore] Bump CI dependencies (#944) (diff) | |
download | gotosocial-c4c713988a62c2ca1ea92778f2cebbfd483c98f1.tar.xz |
[frontend] change bundler to skulk (#942)
* replace web bundler with skulk
* upgrade skulk
* add license
Diffstat (limited to 'testrig/router.go')
-rw-r--r-- | testrig/router.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testrig/router.go b/testrig/router.go index 5ab228611..b8f6a77f5 100644 --- a/testrig/router.go +++ b/testrig/router.go @@ -22,6 +22,7 @@ import ( "context" "os" "path/filepath" + "strconv" "github.com/gin-gonic/gin" "github.com/superseriousbusiness/gotosocial/internal/config" @@ -44,6 +45,12 @@ func NewTestRouter(db db.DB) router.Router { config.SetBindAddress(alternativeBindAddress) } + if alternativePortStr := os.Getenv("GTS_PORT"); alternativePortStr != "" { + if alternativePort, err := strconv.Atoi(alternativePortStr); err == nil { + config.SetPort(alternativePort) + } + } + r, err := router.New(context.Background(), db) if err != nil { panic(err) |