Run dev server throughout orb lifecycle (#19)

Amp-Thread-ID: https://ampcode.com/threads/T-019f8aec-e13a-7495-a56f-89bcb9e9fbc1

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Akash Shakdwipeea
2026-07-23 19:14:37 +05:30
committed by GitHub
co-authored by Amp
parent a4414cc735
commit 8a8369706b
4 changed files with 14 additions and 4 deletions
+5 -1
View File
@@ -10,6 +10,7 @@ const __dirname = path.dirname(__filename);
const portalHost = process.env.PUBLIC_URL
? new URL(process.env.PUBLIC_URL).hostname
: undefined;
const serverPort = Number(process.env.PORT) || 8080;
export default defineConfig({
build: {
@@ -46,7 +47,10 @@ export default defineConfig({
wasm(),
],
server: {
port: 8080,
host: process.env.PORT ? "0.0.0.0" : undefined,
port: serverPort,
strictPort: true,
allowedHosts: portalHost ? [portalHost, ".e2b.app"] : [],
headers: {
"Cross-Origin-Embedder-Policy": "require-corp",
"Cross-Origin-Opener-Policy": "same-origin",