diff options
Diffstat (limited to 'magefile.go')
| -rw-r--r-- | magefile.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/magefile.go b/magefile.go index 9c4a01bc..39afbf93 100644 --- a/magefile.go +++ b/magefile.go @@ -5,6 +5,7 @@ package main import ( "context" + "runtime" "github.com/magefile/mage/mg" "github.com/magefile/mage/sh" @@ -24,12 +25,21 @@ func RunSp() error { return sh.RunV("ruby", "./bin/sp") } +// Run the API Gateway +func RunGateway() error { + return sh.RunV("go", "run", "./cmd/gtwy/main.go") +} + // Open a web browser to the login page func Browser() error { - return sh.RunV("xdg-open", "http://localhost:8283/sessions/new") + if runtime.GOOS == "linux" { + return sh.RunV("xdg-open", "http://localhost:8080/sp/sessions/new") + } else { + return sh.RunV("open", "http://localhost:8080/sp/sessions/new") + } } // Run All the servers func Run(ctx context.Context) { - mg.CtxDeps(ctx, RunIdp, RunSp, Browser) + mg.CtxDeps(ctx, RunIdp, RunSp, RunGateway, Browser) } |
