Get a running sandbox by name from a deployed app.
fromName(
appName: string,
sandboxName: string,
options: Pick<ModalSandboxOptions, "auth">
): Promise<ModalSandbox>| Name | Type | Description |
|---|---|---|
appName* | string | The name of the Modal app |
sandboxName* | string | The name of the sandbox |
options | Pick<ModalSandboxOptions, "auth"> | Optional auth configuration |
const sandbox = await ModalSandbox.fromName("my-app", "my-sandbox");
const result = await sandbox.execute("ls -la");