Skip to content

Commit 9d3752e

Browse files
authored
Updated docs on set ready and start command (#73)
1 parent d940a4e commit 9d3752e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/template/start-ready-command.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ Set the command that runs when the sandbox starts and the command that determine
2626
// Set both start command and ready command
2727
template.setStartCmd('npm start', waitForPort(3000))
2828

29+
// Set custom start and ready command
30+
template.setStartCmd('npm start', 'curl -s -o /dev/null -w "200"')
31+
2932
// Set only ready command
3033
template.setReadyCmd(waitForTimeout(10_000))
3134
```
@@ -34,6 +37,9 @@ template.setReadyCmd(waitForTimeout(10_000))
3437
# Set both start command and ready command
3538
template.set_start_cmd("npm start", wait_for_port(3000))
3639

40+
# Set custom start and ready command
41+
template.set_start_cmd("npm start", 'curl -s -o /dev/null -w "200"')
42+
3743
# Set only ready command
3844
template.set_ready_cmd(wait_for_timeout(10_000))
3945
```
@@ -42,10 +48,6 @@ template.set_ready_cmd(wait_for_timeout(10_000))
4248

4349
The ready command is used to determine when the sandbox is ready to accept connections.
4450

45-
<Note>
46-
You can only call these commands once per template. Subsequent calls will throw an error.
47-
</Note>
48-
4951
## Ready command helpers
5052

5153
The SDK provides helper functions for common ready command patterns:

0 commit comments

Comments
 (0)