feat(settings): added in settings
This commit is contained in:
22
app/src/internal/admin/controller/servers/matchServers.ts
Normal file
22
app/src/internal/admin/controller/servers/matchServers.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* This is intended for when running as dev so we can always keep the servers in sync with the main server.
|
||||
* in the event the server has a change on it we want to make sure we stay in sync
|
||||
*/
|
||||
|
||||
import { createLogger } from "../../../../pkg/logger/logger.js";
|
||||
|
||||
export const mainServerSync = async () => {
|
||||
const log = createLogger({ module: "admin", subModule: "main server sync" });
|
||||
if (
|
||||
process.env.NODE_ENV?.trim() !== "production" &&
|
||||
process.env.MAIN_SERVER
|
||||
) {
|
||||
log.info(
|
||||
{},
|
||||
"Running in dev and have a main server set we will now pull the servers and look for any changes",
|
||||
);
|
||||
} else {
|
||||
log.info({}, "This server is running in production no sync will happen");
|
||||
return;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user