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 {
|
||||
return err
|
||||
} else if ok {
|
||||
runServer(a.Config.ServerIP, a.Config.Port, router)
|
||||
runServer(a.Config.ServerIP, a.Config.ServerPort, router)
|
||||
} else {
|
||||
runServer(a.Config.LocalIP, a.Config.Port, router)
|
||||
runServer(a.Config.LocalIP, a.Config.LocalPort, router)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -10,7 +10,9 @@ type Config struct {
|
|||
TemplatesPath string
|
||||
TemplatesExt string
|
||||
LocalIP string
|
||||
LocalPort string
|
||||
ServerIP string
|
||||
ServerPort string
|
||||
ServerDomain string
|
||||
Port string
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue