agentgui 1.0.287 → 1.0.288
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/package.json +1 -1
- package/server.js +2 -1
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -296,12 +296,13 @@ const debugLog = (msg) => {
|
|
|
296
296
|
};
|
|
297
297
|
|
|
298
298
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
299
|
+
const rootDir = process.env.PORTABLE_EXE_DIR || __dirname;
|
|
299
300
|
const PORT = process.env.PORT || 3000;
|
|
300
301
|
const BASE_URL = (process.env.BASE_URL || '/gm').replace(/\/+$/, '');
|
|
301
302
|
const watch = process.argv.includes('--no-watch') ? false : (process.argv.includes('--watch') || process.env.HOT_RELOAD !== 'false');
|
|
302
303
|
|
|
303
304
|
const STARTUP_CWD = process.env.STARTUP_CWD || process.cwd();
|
|
304
|
-
const staticDir = path.join(
|
|
305
|
+
const staticDir = path.join(rootDir, 'static');
|
|
305
306
|
if (!fs.existsSync(staticDir)) fs.mkdirSync(staticDir, { recursive: true });
|
|
306
307
|
|
|
307
308
|
// Express sub-app for fsbrowse file browser and file upload
|