Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 36 additions & 26 deletions template/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,16 @@ import "dotenv/config";
import { template } from "./template";
import { Template } from "e2b";

Template.build(template, {
alias: "template-tag-dev",
cpuCount: 1,
memoryMB: 1024,
onBuildLogs: (logEntry) => console.log(logEntry.toString()),
});
async function main() {
await Template.build(template, {
alias: "template-tag-dev",
cpuCount: 1,
memoryMB: 1024,
onBuildLogs: (logEntry) => console.log(logEntry.toString()),
});
}

main().catch(console.error);
```

```python build_dev.py
Expand All @@ -116,13 +120,14 @@ from template import template

load_dotenv()

Template.build(
template,
alias="template-tag-dev",
cpu_count=1,
memory_mb=1024,
on_build_logs=lambda log_entry: print(log_entry),
)
if __name__ == '__main__':
Template.build(
template,
alias="template-tag-dev",
cpu_count=1,
memory_mb=1024,
on_build_logs=lambda log_entry: print(log_entry),
)
```

</CodeGroup>
Expand Down Expand Up @@ -150,12 +155,16 @@ import "dotenv/config";
import { template } from "./template";
import { Template } from "e2b";

Template.build(template, {
alias: "template-tag",
cpuCount: 1,
memoryMB: 1024,
onBuildLogs: (logEntry) => console.log(logEntry.toString()),
});
async function main() {
await Template.build(template, {
alias: "template-tag",
cpuCount: 1,
memoryMB: 1024,
onBuildLogs: (logEntry) => console.log(logEntry.toString()),
});
}

main().catch(console.error);
```

```python build_prod.py
Expand All @@ -165,13 +174,14 @@ from template import template

load_dotenv()

Template.build(
template,
alias="template-tag",
cpu_count=1,
memory_mb=1024,
on_build_logs=lambda log_entry: print(log_entry),
)
if __name__ == '__main__':
Template.build(
template,
alias="template-tag",
cpu_count=1,
memory_mb=1024,
on_build_logs=lambda log_entry: print(log_entry),
)
```

</CodeGroup>
Expand Down