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
|
||||
basePath := "/api/controller"
|
||||
if os.Getenv("NODE_ENV") != "production" {
|
||||
if os.Getenv("APP_MODE") != "production" {
|
||||
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()
|
||||
defer server.Close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user