Skip to content

Commit 03e59b7

Browse files
authored
run the app in the background (#3)
2 parents f93f20a + 92ae852 commit 03e59b7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/e2b.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ export async function createSandbox({ files }: { files: z.infer<typeof benchifyF
5252
}
5353

5454
// Run the Vite app
55-
await sandbox.commands.run('cd /home/user/app && npx vite');
55+
sandbox.commands.run('npx vite --host', {
56+
cwd: '/home/user/app',
57+
timeoutMs: 0,
58+
}).catch((error) => {
59+
console.error("Error running Vite:", error);
60+
});
5661

5762
return {
5863
sbxId: sandbox.sandboxId,

0 commit comments

Comments
 (0)