add ip param

This commit is contained in:
YouROK
2025-01-24 18:42:02 +03:00
parent d335016f05
commit f2ffd092ff
4 changed files with 11 additions and 7 deletions

View File

@@ -27,6 +27,7 @@ import (
type args struct {
Port string `arg:"-p" help:"web server port (default 8090)"`
IP string `arg:"-i" help:"web server addr (default empty)"`
Ssl bool `help:"enables https"`
SslPort string `help:"web server ssl port, If not set, will be set to default 8091 or taken from db(if stored previously). Accepted if --ssl enabled."`
SslCert string `help:"path to ssl cert file. If not set, will be taken from db(if stored previously) or default self-signed certificate/key will be generated. Accepted if --ssl enabled."`
@@ -115,7 +116,7 @@ func main() {
}
}
server.Start(params.Port, params.SslPort, params.SslCert, params.SslKey, params.Ssl, params.RDB, params.SearchWA)
server.Start(params.Port, params.IP, params.SslPort, params.SslCert, params.SslKey, params.Ssl, params.RDB, params.SearchWA)
log.TLogln(server.WaitServer())
log.Close()
time.Sleep(time.Second * 3)