Serverless Functions in Pages
Serverless Functions in Pages
Serverless functions open up a world of new possibilities for your website, such as user authentication, form submissions, trigger-based tasks, and more. With Serverless Functions, developers can define and invoke on-demand TypeScript code as part of their web applications – with zero backend configuration or server maintenance required. In Yext Pages, Serverless Functions can be used for two use cases:
The deployment of API endpoints over HTTP
The execution of custom code in response to lifecycle events within the Pages system
Advanced business logic
Serverless Functions allow you to add advanced business logic to enhance your digital experiences. This opens the door to support user authentication, form submissions, trigger-based tasks, and more. Serverless Functions also allow you to invoke specific logic in the pages deployment lifecycle.
Build and local testing
Use Yext's CLI to run a local development server that you can share with others, run a local build and plugins, and deploy your site.
Let Yext do the heavy lifting
Serverless Functions are version-controlled, built, and deployed along with the rest of your Yext site. Not to mention Yext will automatically handle service discovery through our built-in API gateway. This eliminates overhead and brings the power of deploy previews and rollbacks to your functions.