add local port
parent
c1901320e0
commit
174ae82d3a
4
main.go
4
main.go
|
@ -36,9 +36,9 @@ func setupRoutesAndRun(a *models.App) error {
|
||||||
if ok, err := tools.IsIPInUse(a.Config.ServerIP); err != nil {
|
if ok, err := tools.IsIPInUse(a.Config.ServerIP); err != nil {
|
||||||
return err
|
return err
|
||||||
} else if ok {
|
} else if ok {
|
||||||
runServer(a.Config.ServerIP, a.Config.Port, router)
|
runServer(a.Config.ServerIP, a.Config.ServerPort, router)
|
||||||
} else {
|
} else {
|
||||||
runServer(a.Config.LocalIP, a.Config.Port, router)
|
runServer(a.Config.LocalIP, a.Config.LocalPort, router)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -10,7 +10,9 @@ type Config struct {
|
||||||
TemplatesPath string
|
TemplatesPath string
|
||||||
TemplatesExt string
|
TemplatesExt string
|
||||||
LocalIP string
|
LocalIP string
|
||||||
|
LocalPort string
|
||||||
ServerIP string
|
ServerIP string
|
||||||
|
ServerPort string
|
||||||
ServerDomain string
|
ServerDomain string
|
||||||
Port string
|
Port string
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue