File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/content/docs/sandbox/api Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,7 @@ const api = await sandbox.exposePort(3000, { name: 'api' });
4545
4646await sandbox.startProcess('npm run dev');
4747const frontend = await sandbox.exposePort(5173, { name: 'frontend' });
48-
49- ````
48+ ```
5049</TypeScriptExample >
5150
5251### ` unexposePort() `
@@ -55,7 +54,7 @@ Remove an exposed port and close its preview URL.
5554
5655``` ts
5756await sandbox .unexposePort (port : number ): Promise < void >
58- ````
57+ ```
5958
6059** Parameters** :
6160
@@ -80,8 +79,7 @@ const { ports } = await sandbox.getExposedPorts();
8079for (const port of ports) {
8180console.log(`${port.name || port.port}: ${port.exposedAt}`);
8281}
83-
84- ````
82+ ```
8583</TypeScriptExample >
8684
8785### ` connect() `
@@ -92,7 +90,7 @@ Route incoming WebSocket upgrade requests to WebSocket servers running in the sa
9290import { connect } from ' @cloudflare/sandbox' ;
9391
9492const response = await connect (sandbox : Sandbox , request : Request , port : number ): Promise < Response >
95- ````
93+ ```
9694
9795** Parameters** :
9896
You can’t perform that action at this time.
0 commit comments