diff --git a/examples/minimal/Dockerfile b/examples/minimal/Dockerfile index 6fb1011e..aea7758a 100644 --- a/examples/minimal/Dockerfile +++ b/examples/minimal/Dockerfile @@ -2,3 +2,6 @@ FROM docker.io/cloudflare/sandbox:0.4.4 # On a Mac with Apple Silicon, you might need to specify the platform: # FROM --platform=linux/arm64 docker.io/cloudflare/sandbox:0.4.4 + +# Required during local development to access exposed ports +EXPOSE 8080 diff --git a/examples/minimal/src/index.ts b/examples/minimal/src/index.ts index 89017a92..4ab50cd9 100644 --- a/examples/minimal/src/index.ts +++ b/examples/minimal/src/index.ts @@ -1,4 +1,4 @@ -import { getSandbox, proxyToSandbox, type Sandbox } from "@cloudflare/sandbox"; +import { getSandbox, type Sandbox } from "@cloudflare/sandbox"; export { Sandbox } from "@cloudflare/sandbox"; @@ -8,10 +8,6 @@ type Env = { export default { async fetch(request: Request, env: Env): Promise { - // Required for preview URLs (if you expose ports later) - const proxyResponse = await proxyToSandbox(request, env); - if (proxyResponse) return proxyResponse; - const url = new URL(request.url); // Get or create a sandbox instance diff --git a/examples/minimal/wrangler.jsonc b/examples/minimal/wrangler.jsonc index 0c89b596..8f8fcbf8 100644 --- a/examples/minimal/wrangler.jsonc +++ b/examples/minimal/wrangler.jsonc @@ -11,7 +11,8 @@ { "class_name": "Sandbox", "image": "./Dockerfile", - "instance_type": "basic" + "instance_type": "lite", + "max_instances": 1 } ], "durable_objects": {