Files
claudecodeui/server/start.js
Haileyesus 23c39a42b1 fix: update legacy runtime path
- Changed the legacy runtime path from 'legacy-runtime.js' to 'index.js'
in runtime configuration.
- Added a new start script (start.js) to check for the existence of the
built TypeScript server entrypoint and import it.
2026-03-25 11:22:51 +03:00

19 lines
578 B
JavaScript

#!/usr/bin/env node
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const distEntrypoint = path.join(__dirname, 'dist', 'bootstrap.js');
if (!fs.existsSync(distEntrypoint)) {
console.error(
'[server] Missing built TypeScript server entrypoint at server/dist/bootstrap.js. ' +
'Run "npm run server" for development or "npm run server:build" before "npm run server:start".'
);
process.exit(1);
}
await import('./dist/bootstrap.js');