Files
actual/packages/desktop-electron/server.ts
Michael Clark 914f59197f :electron: Removing node-fetch and updating root ca impl for more support (#3782)
* updating root ca impl to use node env variable for more support

* release notes

* removing node-fetch

* clean up

* error message

* Update 3782.md
2024-11-04 18:35:21 +00:00

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);