aboutsummaryrefslogtreecommitdiff
path: root/awwan.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-11-09 12:57:32 +0700
committerShulhan <ms@kilabit.info>2023-11-09 12:57:32 +0700
commitfe14373978ab611cb7757df9f3ade411d9f716b0 (patch)
treec2ae2825f4bd070378682d7e9f6b70720a7870ab /awwan.go
parent7063eb2298a349696a1adf0c08ff2650867e8def (diff)
downloadawwan-fe14373978ab611cb7757df9f3ade411d9f716b0.tar.xz
cmd/awwan: add option "-address" to command serve
The "-address" option allow defining the HTTP server address to serve the web-user interface.
Diffstat (limited to 'awwan.go')
-rw-r--r--awwan.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/awwan.go b/awwan.go
index 3528082..b3eda95 100644
--- a/awwan.go
+++ b/awwan.go
@@ -297,15 +297,15 @@ out:
return err
}
-// Serve start the web-user interface that serve awwan actions through HTTP.
-func (aww *Awwan) Serve(isDev bool) (err error) {
+// Serve start the web-user interface that serve awwan through HTTP.
+func (aww *Awwan) Serve(address string, isDev bool) (err error) {
var logp = `Serve`
if isDev {
go internal.Watch()
}
- aww.httpd, err = newHttpServer(aww)
+ aww.httpd, err = newHttpServer(aww, address)
if err != nil {
return fmt.Errorf(`%s: %w`, logp, err)
}