Skip to content

Commit b6accfa

Browse files
committed
fix formatting
1 parent c5b0e59 commit b6accfa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/content/docs/sandbox/api/ports.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,14 @@ export default {
110110
const sandbox = getSandbox(env.Sandbox, 'my-sandbox');
111111
112112
// Start WebSocket echo server
113-
await sandbox.writeFile('/workspace/server.js', \`
113+
const serverCode = `
114114
Bun.serve({
115115
port: 8080,
116116
fetch(req, server) { if (server.upgrade(req)) return; },
117-
websocket: { message(ws, msg) { ws.send(\\\`Echo: \${msg}\\\`); } }
117+
websocket: { message(ws, msg) { ws.send(\`Echo: \${msg}\`); } }
118118
});
119-
\`);
119+
`;
120+
await sandbox.writeFile('/workspace/server.js', serverCode);
120121
await sandbox.startProcess('bun /workspace/server.js');
121122
122123
// Route WebSocket connections

0 commit comments

Comments
 (0)