Skip to content

Commit cb95990

Browse files
fix(federated-css-react-ssr): wait for server remoteEntry.js endpoints before starting shells
1 parent 20947f7 commit cb95990

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

federated-css-react-ssr/scripts/start-exposes.cjs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ async function main() {
1818
console.log('[exposes] starting static servers for exposes...');
1919
const pServe = run('pnpm', ['--filter', '"federated-css-react-ssr_expose-*"', '-r', 'run', 'serve']);
2020

21-
// Wait for all expose ports to be reachable before proceeding
21+
// Wait for remoteEntry.js endpoints (server side) to be reachable before proceeding
2222
await waitOn({
2323
resources: [
24-
'http://localhost:3001',
25-
'http://localhost:3002',
26-
'http://localhost:3003',
27-
'http://localhost:3004',
28-
'http://localhost:3005',
29-
'http://localhost:3006',
30-
'http://localhost:3007',
24+
'http://localhost:3001/server/remoteEntry.js',
25+
'http://localhost:3002/server/remoteEntry.js',
26+
'http://localhost:3003/server/remoteEntry.js',
27+
'http://localhost:3004/server/remoteEntry.js',
28+
'http://localhost:3005/server/remoteEntry.js',
29+
'http://localhost:3006/server/remoteEntry.js',
30+
'http://localhost:3007/server/remoteEntry.js',
3131
],
3232
timeout: 480000,
3333
validateStatus: s => s >= 200 && s < 500,
3434
});
35-
console.log('[exposes] all expose ports are up.');
35+
console.log('[exposes] all server remoteEntry.js endpoints are up.');
3636
process.on('SIGINT', () => pServe.kill('SIGINT'));
3737
process.on('SIGTERM', () => pServe.kill('SIGTERM'));
3838
// keep process alive

0 commit comments

Comments
 (0)