ezpm2gui 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server/index.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.createServer = createServer;
|
|
|
7
7
|
const express_1 = __importDefault(require("express"));
|
|
8
8
|
const http_1 = __importDefault(require("http"));
|
|
9
9
|
const socket_io_1 = require("socket.io");
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
10
11
|
const pm2_1 = __importDefault(require("pm2"));
|
|
11
12
|
const os_1 = __importDefault(require("os"));
|
|
12
13
|
const processConfig_1 = __importDefault(require("./routes/processConfig"));
|
|
@@ -32,7 +33,7 @@ function createServer() {
|
|
|
32
33
|
// Configure middleware
|
|
33
34
|
app.use(express_1.default.json());
|
|
34
35
|
// Serve static files from the React app build directory
|
|
35
|
-
const staticPath = '
|
|
36
|
+
const staticPath = path_1.default.join(__dirname, '../../src/client/build');
|
|
36
37
|
console.log('Serving static files from:', staticPath);
|
|
37
38
|
const fs = require('fs');
|
|
38
39
|
if (fs.existsSync(staticPath)) {
|
|
@@ -214,7 +215,7 @@ function createServer() {
|
|
|
214
215
|
});
|
|
215
216
|
// Catch-all route to return the React app
|
|
216
217
|
app.get('*', (req, res) => {
|
|
217
|
-
const indexPath = '
|
|
218
|
+
const indexPath = path_1.default.join(__dirname, '../../src/client/build/index.html');
|
|
218
219
|
console.log('Trying to serve index.html from:', indexPath);
|
|
219
220
|
const fs = require('fs');
|
|
220
221
|
if (fs.existsSync(indexPath)) {
|
|
@@ -435,7 +435,8 @@ exports.RemoteConnection = RemoteConnection;
|
|
|
435
435
|
class RemoteConnectionManager {
|
|
436
436
|
constructor() {
|
|
437
437
|
this.connections = new Map();
|
|
438
|
-
|
|
438
|
+
const path = require('path');
|
|
439
|
+
this.configFilePath = path.join(__dirname, '../config/remote-connections.json');
|
|
439
440
|
this.loadConnectionsFromDisk();
|
|
440
441
|
}
|
|
441
442
|
/**
|