The code editor comes equipped with a quick-test environment for debugging your backend code.
Backend code is essential to any Velo site. Since backend code is not visible to site visitors, all sensitive information should be handled on the backend of your site.
One drawback of backend code is that you need to invest effort to trigger the code and test it, such as calling functions from the client side on a test page in your site. This can slow down the development and debugging process.
To save you time and effort, Velo enables quick testing of backend functions directly in the code editor.
For step-by-step instructions on how to test your backend code, see Functional Testing in the Backend.
To test your backend function in the code editor, write your function in a backend code file as usual. Click the Play icon next to the function to open the testing environment.
A new tab opens in the code editor for testing your function. Add sample parameter values and run the function in the test tab. The output appears on the right side of the tab.
Notes
The output you see in the test tab is the same as the output you would see in the Developer Console if you previewed your site and triggered the function. Testing backend functions in the code editor has other similarities to testing in Preview mode:
What's Next? Learn how to test your backend functions.