fosrl.pangolin/server/setup/index.ts

11 lines
501 B
TypeScript
Raw Normal View History

2024-12-22 12:33:49 -05:00
import { ensureActions } from "./ensureActions";
import { copyInConfig } from "./copyInConfig";
2024-12-25 15:49:35 -05:00
import logger from "@server/logger";
import { runMigrations } from "./migrations";
2024-12-22 12:33:49 -05:00
export async function runSetupFunctions() {
2024-12-25 15:49:35 -05:00
logger.info(`Setup for version ${process.env.APP_VERSION}`);
await runMigrations(); // run the migrations
2024-12-22 12:33:49 -05:00
await ensureActions(); // make sure all of the actions are in the db and the roles
await copyInConfig(); // copy in the config to the db as needed
}