Skip to content

Commit 58a3d9e

Browse files
snadrusLexLuthr
andauthored
gui-listen fix (#12013)
* gui-listen fix * fix test --------- Co-authored-by: LexLuthr <lexluthr@curiostorage.org>
1 parent d623884 commit 58a3d9e

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

cmd/curio/deps/deps.go

+3
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context,
291291
}
292292
}
293293
}
294+
if cctx.IsSet("gui-listen") {
295+
deps.Cfg.Subsystems.GuiAddress = cctx.String("gui-listen")
296+
}
294297
if deps.LocalStore == nil {
295298
deps.LocalStore, err = paths.NewLocal(ctx, deps.LocalPaths, deps.Si, []string{"http://" + deps.ListenAddr + "/remote"})
296299
if err != nil {

cmd/curio/run.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ var runCmd = &cli.Command{
3737
Value: "0.0.0.0:12300",
3838
EnvVars: []string{"CURIO_LISTEN"},
3939
},
40+
&cli.StringFlag{
41+
Name: "gui-listen",
42+
Usage: "host address and port the gui will listen on",
43+
Hidden: true,
44+
},
4045
&cli.BoolFlag{
4146
Name: "nosync",
4247
Usage: "don't check full-node sync status",
@@ -157,9 +162,9 @@ var webCmd = &cli.Command{
157162
This creates the 'web' layer if it does not exist, then calls run with that layer.`,
158163
Flags: []cli.Flag{
159164
&cli.StringFlag{
160-
Name: "listen",
161-
Usage: "Address to listen on",
162-
Value: "127.0.0.1:4701",
165+
Name: "gui-listen",
166+
Usage: "Address to listen for the GUI on",
167+
Value: "0.0.0.0:4701",
163168
},
164169
&cli.BoolFlag{
165170
Name: "nosync",

0 commit comments

Comments
 (0)