File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,23 @@ const isLocalDev = process.argv.includes('--local-dev');
3434
3535const __filename = fileURLToPath ( import . meta. url ) ;
3636const __dirname = path . dirname ( __filename ) ;
37- const frontendConfigLocation = isLocalDev ? 'public/frontend-config.json' : 'dist/client/frontend-config.json' ;
3837
38+ // Make frontend configuration available (frontend-config.json)
39+ const frontendConfigLocation = isLocalDev ? 'public/frontend-config.json' : 'dist/client/frontend-config.json' ;
3940if ( process . env . FRONTEND_CONFIG_PATH !== undefined && process . env . FRONTEND_CONFIG_PATH . length > 0 ) {
4041 console . log ( 'FRONTEND_CONFIG_PATH is specified. Will copy the frontend-config from there.' ) ;
4142 console . log ( ` Copying ${ process . env . FRONTEND_CONFIG_PATH } to ${ frontendConfigLocation } ` ) ;
4243 copyFileSync ( process . env . FRONTEND_CONFIG_PATH , frontendConfigLocation ) ;
4344}
4445
46+ // Make hyperspace portal configuration available (hyperspace-portal-config.json)
47+ if ( ! isLocalDev && process . env . HYPERSPACE_PORTAL_CONFIG_PATH !== undefined && process . env . HYPERSPACE_PORTAL_CONFIG_PATH . length > 0 ) {
48+ const hyperspacePortalConfigLocation = 'dist/client/hyperspace-portal-config.json' ;
49+ console . log ( 'HYPERSPACE_PORTAL_CONFIG_PATH is specified. Will copy the hyperspace-portal-config from there.' ) ;
50+ console . log ( ` Copying ${ process . env . HYPERSPACE_PORTAL_CONFIG_PATH } to ${ hyperspacePortalConfigLocation } ` ) ;
51+ copyFileSync ( process . env . HYPERSPACE_PORTAL_CONFIG_PATH , hyperspacePortalConfigLocation ) ;
52+ }
53+
4554const fastify = Fastify ( {
4655 logger : true ,
4756} ) ;
You can’t perform that action at this time.
0 commit comments