add new argument for remote port
This commit is contained in:
@@ -43,6 +43,7 @@ func Init() *Args {
|
||||
keyFile := flag.String("keyFile", "./cert/key.pem", "path of keyfile")
|
||||
portHttp := flag.Uint("http-port", 8100, "json server communication for http/ws")
|
||||
portHttps := flag.Uint("https-port", 8101, "json server communication for http/wss")
|
||||
remotePort := flag.Uint("remotePort", 9500, "remote Port of gui user interface")
|
||||
rootDir := flag.String("workingDir", "./", "working directory")
|
||||
dbmFile := flag.String("dbm", "/test/test", "dbm file name")
|
||||
debug := flag.Bool("debug", false, "debug flag")
|
||||
@@ -56,8 +57,9 @@ func Init() *Args {
|
||||
KeyFile: *keyFile,
|
||||
},
|
||||
Port: models.Port{
|
||||
Http: *portHttp,
|
||||
Https: *portHttps,
|
||||
Http: *portHttp,
|
||||
Https: *portHttps,
|
||||
Remote: *remotePort,
|
||||
},
|
||||
RootDir: *rootDir,
|
||||
DBMFile: *dbmFile,
|
||||
|
2
main.go
2
main.go
@@ -23,7 +23,7 @@ func main() {
|
||||
|
||||
//initialize new server
|
||||
dbmHandler.Log.Debug("main", "initialize new server instance")
|
||||
s := ws.NewServer(a.AllowOrigins, 9000)
|
||||
s := ws.NewServer(a.AllowOrigins, a.Port.Remote)
|
||||
|
||||
//set routes
|
||||
dbmHandler.Log.Debug("main", "setting routes")
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package models
|
||||
|
||||
type Port struct {
|
||||
Http uint
|
||||
Https uint
|
||||
Http uint
|
||||
Https uint
|
||||
Remote uint
|
||||
}
|
||||
|
Reference in New Issue
Block a user