23 lines
705 B
TypeScript
23 lines
705 B
TypeScript
/**
|
|
* 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;
|
|
}
|
|
};
|