feat: enhance configuration file handling and dynamic frontend path resolution (#40)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
samanhappy
2025-04-30 22:38:21 +08:00
committed by GitHub
parent 7887a3a5f9
commit 0a6259decf
8 changed files with 400 additions and 43 deletions

View File

@@ -1,10 +1,10 @@
import fs from 'fs';
import path from 'path';
import { MarketServer } from '../types/index.js';
import { getConfigFilePath } from '../utils/path.js';
// Get path to the servers.json file
export const getServersJsonPath = (): string => {
return path.resolve(process.cwd(), 'servers.json');
return getConfigFilePath('servers.json', 'Servers');
};
// Load all market servers from servers.json