Vue Storefront's Server Middleware is an Express.js application that provides a single place for you to connect to the multiple services that you need to run your storefront.
It acts as a layer between your frontend application and the various services that you need to connect to, such as a commerce backend, CMS, or payment gateway.
- Connect multiple services using different technologies and libraries
- Create and extend integrations to add new capabilities or modify their behavior
- Control of the requests sent to the integration platform and responses sent back to the Nuxt.js application
- Securely store credentials on the server without exposing them to the end-users of your application
- Improve site performance by moving logic to the server abd shipping less code to the browser
If you're using one of our storefronts, the middleware is set up for you. Our storefronts come with a middleware and frontend app already configured, so you can get started right away.
But if you're building your Vue Storefront application from scratch, you'll need to set up the middleware to connect to your backend services.
The easiest way to explain the Server Middleware architecture is to base the explanation on the Vue Storefront Integration context.
In the container, the server application uses the integration that can communicate with the external service provider (e.g. commerce backend). The integration can be extended by the integration extensions. Middleware config is provided for both integration and its extensions.