Expose specific ports on your sandbox and learn the methods to connect to them.
ports
parameter.
import { SandboxInstance } from "@blaxel/core";
// Create a new sandbox
const sandbox = await SandboxInstance.create({
name: "my-sandbox",
image: "blaxel/prod-base:latest",
memory: 4096,
ports: [{ target: 3000 }]
});
// Wait for deployment
await sandbox.wait();
https://run.blaxel.ai/{workspace_id}/sandboxes/{sandbox_id}/port/{port_number}
https://run.blaxel.ai/my-workspace/sandboxes/my-sandbox/port/3000
Was this page helpful?