From d9c9ee54dfb65e8c9a5931253ff6f03ef71c4474 Mon Sep 17 00:00:00 2001 From: Andreas Kienle Date: Tue, 12 Aug 2025 15:35:53 +0200 Subject: [PATCH] feat: add Hyperspace Portal integration --- server.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server.ts b/server.ts index d2993a27..114b6e37 100644 --- a/server.ts +++ b/server.ts @@ -34,14 +34,23 @@ const isLocalDev = process.argv.includes('--local-dev'); const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -const frontendConfigLocation = isLocalDev ? 'public/frontend-config.json' : 'dist/client/frontend-config.json'; +// Make frontend configuration available (frontend-config.json) +const frontendConfigLocation = isLocalDev ? 'public/frontend-config.json' : 'dist/client/frontend-config.json'; if (process.env.FRONTEND_CONFIG_PATH !== undefined && process.env.FRONTEND_CONFIG_PATH.length > 0) { console.log('FRONTEND_CONFIG_PATH is specified. Will copy the frontend-config from there.'); console.log(` Copying ${process.env.FRONTEND_CONFIG_PATH} to ${frontendConfigLocation}`); copyFileSync(process.env.FRONTEND_CONFIG_PATH, frontendConfigLocation); } +// Make hyperspace portal configuration available (hyperspace-portal-config.json) +if (!isLocalDev && process.env.HYPERSPACE_PORTAL_CONFIG_PATH !== undefined && process.env.HYPERSPACE_PORTAL_CONFIG_PATH.length > 0) { + const hyperspacePortalConfigLocation = 'dist/client/hyperspace-portal-config.json'; + console.log('HYPERSPACE_PORTAL_CONFIG_PATH is specified. Will copy the hyperspace-portal-config from there.'); + console.log(` Copying ${process.env.HYPERSPACE_PORTAL_CONFIG_PATH} to ${hyperspacePortalConfigLocation}`); + copyFileSync(process.env.HYPERSPACE_PORTAL_CONFIG_PATH, hyperspacePortalConfigLocation); +} + const fastify = Fastify({ logger: true, });