File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ import { parseArgs, promisify } from 'util'
66import { request } from 'undici'
77import { exec } from 'child_process'
88
9- const __dirname = import . meta. dirname
10-
119const execAsync = promisify ( exec )
1210
1311const msOneMinute = 1000 * 60
@@ -50,12 +48,17 @@ export async function start (client, selectedRuntime) {
5048 }
5149 }
5250
53- const configFile = join ( __dirname , '..' , 'watt.json' )
54- const server = await create ( configFile , undefined , {
51+ // We move to the project root to start the server
52+ // so amaro will load correctly
53+ const cwd = process . cwd ( )
54+ const root = join ( import . meta. dirname , '..' )
55+ process . chdir ( root )
56+ const server = await create ( 'watt.json' , undefined , {
5557 setupSignals : false ,
5658 isProduction : true
5759 } )
5860 entrypointUrl = await server . start ( )
61+ process . chdir ( cwd )
5962
6063 if ( record ) {
6164 async function shutdown ( ) {
You can’t perform that action at this time.
0 commit comments