Files
claudecodeui/server/src/app.ts
2026-03-25 17:33:23 +03:00

33 lines
1.1 KiB
TypeScript

import './config/load-env-vars.js';
import { pathToFileURL } from 'url';
import { getRuntimePaths } from '@/config/runtime.js';
import type { ServerApplication } from '@/shared/types/app.js';
import { logger } from '@/shared/utils/logger.js';
export function createServerApplication(): ServerApplication {
const runtimePaths = getRuntimePaths();
return {
runtimePaths,
start: async () => {
// ----------------------------------------------
// 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.refactorRuntimePath).href);
},
};
}