The Wix CLI allows you to add backend extensions to your project.
The following backend extensions are available in the CLI:
You can add these extensions using the generate command.
You can also expose server-side logic to your frontend extensions through backend APIs, which you build using HTTP endpoints. Unlike the extensions above, HTTP endpoints aren't created with the generate command and aren't traditional extensions.
Backend extensions built with the CLI have execution limits, rate limits, and a time limit for backend functionality in previews. Read more about limits.
Service plugin extensions are a set of APIs defined by Wix that you can use to enable your project to inject custom logic into existing flows or to introduce entirely new flows.
For example, you can add an Additional Fees Service Plugin to add custom charges and fees to carts and checkouts based on business-specific calculations and logic.
You can implement service plugin extensions in your project using the CLI. Read more about service plugin extensions.
Events are triggered when specific conditions on your project are met. These are conditions on a Wix user's site.
For example, an event might be triggered when a booking is confirmed.
Your project can respond to these events using event extensions created in the CLI. Events in the CLI are built on JavaScript SDK webhooks, and event extensions subscribe your project to these webhooks behind the scenes. Read more about event extensions.
Data collections extensions let your app automatically create CMS data collections when it's installed on a site. You define each collection's schema, permissions, and optional initial data in your project files. When a Wix user installs your app, the collections are created in the site's CMS with the configuration you specified.
Read more about data collections extensions.
Important: Limits are subject to change. We'll notify you of any upcoming changes through the CLI and Discord, and note them here in the documentation.
Backend extensions in the CLI have the following limits:
Previews generated by npm run preview last indefinitely. However, any backend extensions in these previews stop functioning after 3 days.
In the legacy Wix CLI for Apps, backend APIs were built with HTTP functions and web methods. In the current Wix CLI, backend APIs use HTTP endpoints instead. Learn how to add HTTP endpoints to your project, or migrate existing HTTP functions or web methods to HTTP endpoints.