Running Functions
Using the Run Button
On the main function page, you'll find a Run button. This is a quick and easy way to test your function directly from the CodeUpify interface.
The Run button will send a POST
request to your function with the given JSON input.
- Testing: When you click the Run button, your function will execute. The interface will provide two tabs:
- Response: Shows the HTTP status and the response returned by your function.
- Output: Displays any output your function generates, including
stdout
,stderr
, and the return value.
Note: The Run button only supports testing with
POST
requests.
Using the Function URL
You can find the live endpoint URL for your function under the Info tab. You can send requests to this URL using any HTTP method (GET
, POST
, PUT
, etc.) via tools like your browser, Postman, or cURL.
- Example:
- You can open the URL in your browser for a simple
GET
request. - Use Postman to send a
POST
request with a JSON body for more complex testing.
- You can open the URL in your browser for a simple
Accessing Logs
After running your function, you can review its execution details in the Logs tab. The logs provide valuable information about previous runs, including:
- Duration: How long the function took to execute.
- Stdout: The standard output generated by your function.
- Stderr: Any errors or warnings produced during execution.
- Return Value: The value returned by your function.
This is particularly useful for debugging and ensuring your function behaves as expected.