refactor(backend): add refactored runner for new backend architecture

This commit is contained in:
Haileyesus
2026-03-18 10:19:37 +03:00
parent 7df21556dd
commit bbb461f7c2
6 changed files with 65 additions and 12 deletions

View File

@@ -1,3 +1,5 @@
import './config/load-env-vars.js';
import { pathToFileURL } from 'url';
import { getRuntimePaths } from '@/config/runtime.js';
@@ -6,14 +8,25 @@ import { logger } from '@/shared/utils/logger.js';
export function createServerApplication(): ServerApplication {
const runtimePaths = getRuntimePaths();
return {
runtimePaths,
start: async () => {
logger.info('Bootstrapping backend via legacy runtime bridge', {
legacyRuntime: runtimePaths.legacyRuntimePath,
// ----------------------------------------------
// Legacy backend Runner
// logger.info('Bootstrapping backend via legacy runtime bridge', {
// legacyRuntime: runtimePaths.legacyRuntimePath,
// });
// await import(pathToFileURL(runtimePaths.legacyRuntimePath).href);
// ----------------------------------------------
// ----------------------------------------------
// Refactor backend Runner
logger.info('Bootstrapping backend via refactor runtime', {
refactorRuntime: runtimePaths.refactorRuntimePath,
});
await import(pathToFileURL(runtimePaths.legacyRuntimePath).href);
await import(pathToFileURL(runtimePaths.refactorRuntimePath).href);
},
};
}