-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
executable file
·36 lines (28 loc) · 1012 Bytes
/
Copy pathindex.js
File metadata and controls
executable file
·36 lines (28 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env node
import CommandRunner from './src/cli/CommandRunner.js';
import Logger from './src/utils/Logger.js';
async function main() {
try {
Logger.info('TEST_OPI Application starting...');
const commandRunner = new CommandRunner();
await commandRunner.run();
} catch (error) {
Logger.error('Application failed to start', { error: error.message });
console.error('❌ Application failed to start:', error.message);
process.exit(1);
}
}
// Handle uncaught exceptions
process.on('uncaughtException', (error) => {
Logger.error('Uncaught exception', { error: error.message, stack: error.stack });
console.error('❌ Uncaught exception:', error.message);
process.exit(1);
});
// Handle unhandled promise rejections
process.on('unhandledRejection', (reason, promise) => {
Logger.error('Unhandled promise rejection', { reason, promise });
console.error('❌ Unhandled promise rejection:', reason);
process.exit(1);
});
// Start the application
main();