File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff 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
2727template .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
3033template .setReadyCmd (waitForTimeout (10_000 ))
3134```
@@ -34,6 +37,9 @@ template.setReadyCmd(waitForTimeout(10_000))
3437# Set both start command and ready command
3538template.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
3844template.set_ready_cmd(wait_for_timeout(10_000 ))
3945```
@@ -42,10 +48,6 @@ template.set_ready_cmd(wait_for_timeout(10_000))
4248
4349The 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
5153The SDK provides helper functions for common ready command patterns:
You can’t perform that action at this time.
0 commit comments