mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 05:01:08 +01:00
feat(dev): add hot-realoding proxy dev server on :30001
This commit is contained in:
parent
1b9defe4ad
commit
ddb4c29252
7 changed files with 315 additions and 40 deletions
|
|
@ -16,12 +16,23 @@ if (fs.existsSync('.env')) {
|
|||
// Set defaults if not in environment
|
||||
const foundryPath = process.env.FOUNDRY_MAIN_PATH || '../../../../FoundryDev/main.js';
|
||||
const dataPath = process.env.FOUNDRY_DATA_PATH || '../../../';
|
||||
const foundryPort = process.env.FOUNDRY_PORT || '30000';
|
||||
|
||||
// Run the original command with proper environment
|
||||
const args = ['rollup -c --watch', `node "${foundryPath}" --dataPath="${dataPath}" --noupnp`, 'gulp'];
|
||||
const args = [
|
||||
'rollup -c --watch',
|
||||
`node "${foundryPath}" --dataPath="${dataPath}" --noupnp --port=${foundryPort}`,
|
||||
'gulp',
|
||||
'node ./tools/dev-proxy.mjs'
|
||||
];
|
||||
|
||||
spawn('npx', ['concurrently', ...args.map(arg => `"${arg}"`)], {
|
||||
stdio: 'inherit',
|
||||
cwd: process.cwd(),
|
||||
shell: true
|
||||
});
|
||||
|
||||
// Friendly hint
|
||||
console.log('\n\x1b[32mDev proxy: http://localhost:30001\x1b[0m (overlay)');
|
||||
console.log(`\x1b[36mFoundry: http://localhost:${foundryPort}\x1b[0m (installed)`);
|
||||
console.log('\nOpen http://localhost:30001 to see your dev version, or close it to return to the installed version.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue