refactor(controller): changes the app env to app instead of node as it makes more sense
This commit is contained in:
@@ -28,7 +28,7 @@ func main() {
|
|||||||
|
|
||||||
// gin stuff
|
// gin stuff
|
||||||
basePath := "/api/controller"
|
basePath := "/api/controller"
|
||||||
if os.Getenv("NODE_ENV") != "production" {
|
if os.Getenv("APP_MODE") != "production" {
|
||||||
basePath = "/lst/api/controller"
|
basePath = "/lst/api/controller"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +139,16 @@ func main() {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
go bot.TheBot()
|
// only activate the bot if its on VMS036 or my dev server
|
||||||
|
host, err := os.Hostname()
|
||||||
|
if err != nil {
|
||||||
|
server.BroadcastToRoom("/", "update", "updateLogs", "Could not retrieve hostname")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if host == os.Getenv("PRIMARY_SERVER") {
|
||||||
|
go bot.TheBot()
|
||||||
|
}
|
||||||
|
|
||||||
go server.Serve()
|
go server.Serve()
|
||||||
defer server.Close()
|
defer server.Close()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user