Skip to content

Commit 7f83ddc

Browse files
committed
fix: update app initialization to support async runtime imports
- Changed app initialization in init.ts to await the runtime import function - Ensured compatibility with asynchronous configuration loading - Minor adjustments to maintain existing functionality
1 parent 1956d27 commit 7f83ddc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/commands/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ ${config.features.includes('websocket') ? `import { setupWebSockets } from './we
414414
const appConfig = initializeConfig();
415415
416416
// Create MoroJS application with ${config.runtime} runtime
417-
const app = ${runtimeImports[config.runtime as keyof typeof runtimeImports]}({
417+
const app = await ${runtimeImports[config.runtime as keyof typeof runtimeImports]}({
418418
${config.features.includes('cors') ? `cors: true,` : ''}
419419
${config.features.includes('compression') ? `compression: true,` : ''}
420420
${config.features.includes('websocket') && config.websocketAdapter !== 'none' ? this.getWebSocketConfigString(config.websocketAdapter) : ''}

0 commit comments

Comments
 (0)