Restore to commit 74e578279624c6045ca440a3459ebfa1f8d54191
This commit is contained in:
15
chat_v2/server.js
Normal file
15
chat_v2/server.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// chat_v2: wrapper that starts the main chat/server.js file
|
||||
// using robust path detection for both container (/opt/webchat) and local environments
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// Container path: /opt/webchat/server.js
|
||||
// Local path: ../chat/server.js
|
||||
const containerPath = '/opt/webchat/server.js';
|
||||
const localPath = path.join(__dirname, '../chat/server.js');
|
||||
|
||||
if (fs.existsSync(containerPath)) {
|
||||
require(containerPath);
|
||||
} else {
|
||||
require(localPath);
|
||||
}
|
||||
Reference in New Issue
Block a user