File tree Expand file tree Collapse file tree 3 files changed +22
-9
lines changed Expand file tree Collapse file tree 3 files changed +22
-9
lines changed Original file line number Diff line number Diff line change 1010 "build" : " astro build" ,
1111 "preview" : " astro preview" ,
1212 "astro" : " astro" ,
13- "start" : " node scripts/start-pg-world.js && node dist/server/entry .mjs"
13+ "start" : " node scripts/start-with-pg .mjs"
1414 },
1515 "dependencies" : {
1616 "@astrojs/node" : " 9.5.0" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+
3+ // Start the Postgres World before starting the Astro server
4+ // Needed since we test this in CI
5+ // Astro doesn't have a hook for starting the Postgres World in production
6+
7+ async function main ( ) {
8+ if ( process . env . WORKFLOW_TARGET_WORLD === '@workflow/world-postgres' ) {
9+ console . log ( 'Starting Postgres World...' ) ;
10+ const { getWorld } = await import ( 'workflow/runtime' ) ;
11+ await getWorld ( ) . start ?. ( ) ;
12+ }
13+
14+ // Now start the Astro server
15+ await import ( '../dist/server/entry.mjs' ) ;
16+ }
17+
18+ main ( ) . catch ( ( error ) => {
19+ console . error ( 'Failed to start server:' , error ) ;
20+ process . exit ( 1 ) ;
21+ } ) ;
You can’t perform that action at this time.
0 commit comments