mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2024-11-04 17:31:17 +00:00
issue #11 bug, introduced earlier 0aad10cb63
This commit is contained in:
parent
27ac668c0b
commit
fe2ee45032
10
main.go
10
main.go
@ -41,6 +41,16 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if server.json exists otherwise create it
|
||||||
|
if !util.FileExists(filepath.Join(os.Getenv("WG_CONF_DIR"), "server.json")) {
|
||||||
|
_, err = core.ReadServer()
|
||||||
|
if err != nil {
|
||||||
|
log.WithFields(log.Fields{
|
||||||
|
"err": err,
|
||||||
|
}).Fatal("server.json doesnt not exists and can not read it")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if os.Getenv("GIN_MODE") == "debug" {
|
if os.Getenv("GIN_MODE") == "debug" {
|
||||||
// set gin release debug
|
// set gin release debug
|
||||||
gin.SetMode(gin.DebugMode)
|
gin.SetMode(gin.DebugMode)
|
||||||
|
Loading…
Reference in New Issue
Block a user