Skip to content

Commit c5b0e59

Browse files
committed
fix escaping literal
1 parent 7aacdc2 commit c5b0e59

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/content/docs/sandbox/index.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,14 @@ df['sales'].sum() # Last expression is automatically returned
121121
const sandbox = getSandbox(env.Sandbox, 'user-123');
122122

123123
// Start a WebSocket echo server
124-
await sandbox.writeFile('/workspace/server.js', \`
124+
const serverCode = `
125125
Bun.serve({
126126
port: 8080,
127127
fetch(req, server) { if (server.upgrade(req)) return; },
128-
websocket: { message(ws, msg) { ws.send(\\\`Echo: \${msg}\\\`); } }
128+
websocket: { message(ws, msg) { ws.send(\`Echo: \${msg}\`); } }
129129
});
130-
\`);
130+
`;
131+
await sandbox.writeFile('/workspace/server.js', serverCode);
131132
await sandbox.startProcess('bun /workspace/server.js');
132133

133134
// Route WebSocket connections to the server

0 commit comments

Comments
 (0)