The Wix CLI allows you to add backend extensions to your app.
The following backend extensions are available in the CLI:
You can add these extensions using the npm run generate
command.
All backend extensions built with the CLI have:
Service plugin extensions (formerly SPIs) are a set of APIs defined by Wix that you can use to enable your app to inject custom logic into existing app flows or to introduce entirely new flows to Wix sites. You can implement service plugin extensions in your app using the CLI. Read more about service plugin extensions.
API extensions allow you to define HTTP functions that can be called from your frontend code. The CLI handles the setup and hosting of the backend code for you, simplifying the development process. These API functions can be invoked from any frontend component in your CLI project. Read more about API extensions.
Events are triggered when specific conditions on your app or a user’s site are met. Wix Apps 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 app to these webhooks behind the scenes. Read more about event extensions.
You can use the CLI to view logs from the backend of any version of your app.
For instructions on how to do this, see logs in the CLI Command Reference.
Important: Limits are subject to change. We will notify you of any upcoming changes through the CLI and Discord, and note them here in the 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.