refactor(controller): changes the app env to app instead of node as it makes more sense

This commit is contained in:
2025-09-18 21:42:37 -05:00
parent 1634d5d826
commit 60890b4478

View File

@@ -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()