index.ts 558 B

123456789101112131415
  1. import { ensureActions } from "./ensureActions";
  2. import { copyInConfig } from "./copyInConfig";
  3. import { setupServerAdmin } from "./setupServerAdmin";
  4. import logger from "@server/logger";
  5. export async function runSetupFunctions() {
  6. try {
  7. await copyInConfig(); // copy in the config to the db as needed
  8. await setupServerAdmin();
  9. await ensureActions(); // make sure all of the actions are in the db and the roles
  10. } catch (error) {
  11. logger.error("Error running setup functions:", error);
  12. process.exit(1);
  13. }
  14. }