About Wix CLI Backend Extensions

The Wix CLI is in Developer Preview and is subject to change.

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.

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

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.

Event extensions

Events are triggered when specific conditions on your project are met. For app projects, these are conditions on a Wix user's site. For headless projects, they're conditions on your project'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.

Limits

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:

Execution rate limits

  • 1000 CPU MS per request: Backend requests taking longer than 1000 CPU MS to complete are terminated.
  • 20 sub-requests: Sub-requests are requests made from your backend extensions, such as calls to Wix APIs, in response to a request. Your project can make up to 20 sub-requests in response to each request. Sub-requests beyond the 20th will not be made.

Request rate limit

  • 1000 requests per second: This is the limit for the total number of backend requests from your project. Requests beyond this are ignored.

Backend functionality for previews

Previews generated by npm run preview last indefinitely. However, any backend extensions in these previews stop functioning after 3 days.

See also

Did this help?