feat(core): isolate dev and production environments
- Add IS_DEV_ENVIRONMENT flag to paths.ts for automatic detection - Dev uses 'Gemini Nexus Dev' app data dir and '.geminiNexus-agent-dev' agent dir - Dev proxy defaults to port 8046, production stays on 8045 - Move app.setName() before packetLogPath to ensure correct userData path - Config, DB, logs, and ORPC packets fully isolated between dev and prod
This commit is contained in:
1 parent
bf5a42c03e
commit
5c44a622a8
4 files changed
+38
-22
No files matched your search
+6
-1
@@ -9,11 +9,16 @@ import { ProxyConfig } from '../types/config';
|
||||
import { setServerConfig } from './server-config';
|
||||
import { registerApiLogging } from './logging/api-logging.plugin';
|
||||
|
||||
import { IS_DEV_ENVIRONMENT } from '../utils/paths';
|
||||
|
||||
let app: NestFastifyApplication | null = null;
|
||||
let currentPort: number = 0;
|
||||
|
||||
/** Default port: 8046 in development, 8045 in production */
|
||||
const DEFAULT_PORT = IS_DEV_ENVIRONMENT ? 8046 : 8045;
|
||||
|
||||
export async function bootstrapNestServer(config: ProxyConfig): Promise<boolean> {
|
||||
const port = config.port || 8045;
|
||||
const port = config.port || DEFAULT_PORT;
|
||||
if (app) {
|
||||
logger.info('NestJS server already running.');
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user