-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-dev.ts
More file actions
42 lines (34 loc) Β· 1.19 KB
/
start-dev.ts
File metadata and controls
42 lines (34 loc) Β· 1.19 KB
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
36
37
38
39
40
41
42
#!/usr/bin/env tsx
/**
* Atlas Backend Development Server
*
* Quick development startup with hot reloading and detailed logging.
* This script is optimized for development workflow.
*/
import dotenv from 'dotenv';
import atlasApp from './src/backend/app';
// Load environment variables with development defaults
dotenv.config();
// Override for development
process.env.NODE_ENV = 'development';
process.env.API_PORT = process.env.API_PORT || '3001';
process.env.LOG_LEVEL = 'debug';
console.log('π₯ Starting Atlas Backend in DEVELOPMENT mode...');
console.log('π Hot reloading enabled via tsx');
console.log('π Debug logging enabled');
// Enhanced error handling for development
process.on('uncaughtException', (error) => {
console.error('π₯ Uncaught Exception in Development:', error);
console.error('Stack:', error.stack);
process.exit(1);
});
process.on('unhandledRejection', (reason, promise) => {
console.error('π« Unhandled Promise Rejection in Development:', reason);
console.error('Promise:', promise);
process.exit(1);
});
// Start the application
atlasApp.start().catch((error) => {
console.error('β Failed to start Atlas Backend in development:', error);
process.exit(1);
});