File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -2,3 +2,6 @@ FROM docker.io/cloudflare/sandbox:0.4.4
22
33# On a Mac with Apple Silicon, you might need to specify the platform:
44# FROM --platform=linux/arm64 docker.io/cloudflare/sandbox:0.4.4
5+
6+ # Required during local development to access exposed ports
7+ EXPOSE 8080
Original file line number Diff line number Diff line change 1- import { getSandbox , proxyToSandbox , type Sandbox } from "@cloudflare/sandbox" ;
1+ import { getSandbox , type Sandbox } from "@cloudflare/sandbox" ;
22
33export { Sandbox } from "@cloudflare/sandbox" ;
44
@@ -8,10 +8,6 @@ type Env = {
88
99export default {
1010 async fetch ( request : Request , env : Env ) : Promise < Response > {
11- // Required for preview URLs (if you expose ports later)
12- const proxyResponse = await proxyToSandbox ( request , env ) ;
13- if ( proxyResponse ) return proxyResponse ;
14-
1511 const url = new URL ( request . url ) ;
1612
1713 // Get or create a sandbox instance
Original file line number Diff line number Diff line change 1111 {
1212 "class_name" : " Sandbox" ,
1313 "image" : " ./Dockerfile" ,
14- "instance_type" : " basic"
14+ "instance_type" : " lite" ,
15+ "max_instances" : 1
1516 }
1617 ],
1718 "durable_objects" : {
You can’t perform that action at this time.
0 commit comments