mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 18:40:34 -05:00
* updating root ca impl to use node env variable for more support * release notes * removing node-fetch * clean up * error message * Update 3782.md
21 lines
567 B
TypeScript
21 lines
567 B
TypeScript
const lazyLoadBackend = async (isDev: boolean) => {
|
|
if (process.env.lootCoreScript === undefined) {
|
|
throw new Error(
|
|
'The environment variable `lootCoreScript` is not defined. Please define it to point to the server bundle.',
|
|
);
|
|
}
|
|
|
|
try {
|
|
const bundle = await import(process.env.lootCoreScript);
|
|
bundle.initApp(isDev);
|
|
} catch (error) {
|
|
console.error('Failed to init the server bundle:', error);
|
|
throw new Error(`Failed to init the server bundle: ${error}`);
|
|
}
|
|
};
|
|
|
|
const isDev = false;
|
|
|
|
// Start the app
|
|
lazyLoadBackend(isDev);
|