Many Velo APIs include events that trigger when the required conditions are met. Unlike in the frontend, where event handlers are defined in the page code, for backend events, handlers are defined in the events.js
backend file.
For example, you might have backend event handlers that trigger when:
Backend events are only triggered for published sites and don't work in preview mode.
You can define backend event handlers using:
To test an event handler in preview mode, use functional testing. Functional testing saves you time and effort when building your own system for triggering and testing your backend functions, by allowing you to quickly test backend functions directly in the code editor.
See step-by-step instructions on how to test your backend code.
Velo packages are code libraries built with Velo that allow you to add specific functionality to your site, saving you the time you would have spent coding the functionality on your own.
Some Velo packages include backend events, which are contained in their own events.js
files. So if you add a Velo package that includes backend events, you might end up with multiple events.js
files in several locations.