17 lines
475 B
TypeScript
17 lines
475 B
TypeScript
// Entry point: Load Infisical secrets, then start the app
|
|
// Instead of:
|
|
import "dotenv/config";
|
|
|
|
import cluster from "node:cluster";
|
|
|
|
import { initInfisical } from "./external/infisical/initInfisical.js";
|
|
|
|
// Load Infisical secrets into process.env ONLY in master/primary process
|
|
// Infisical will NOT override existing env vars (from .env above)
|
|
if (cluster.isPrimary) {
|
|
await initInfisical();
|
|
}
|
|
|
|
// Now dynamically import and run the main app
|
|
await import("./init.js");
|