Lambda
Example
When should I use XanoScript instead of Lambda functions, or should I migrate my existing Lambdas to XanoScript?
Lambda functions in Xano are self-contained pieces of code written in JavaScript or TypeScript. They’re ideal for solving edge cases that can’t be easily addressed using the visual builder—such as performing complex cryptography, integrating with niche APIs, or leveraging specific NPM packages. While Lambdas offer flexibility and access to the wider JS ecosystem, they can create challenges for collaboration, visibility, and maintainability—especially when your team relies on the visual builder or XanoScript for most backend logic. You should consider migrating your Lambda functions to XanoScript if one or more of the following apply:- The Lambda performs logic that can already be handled with native Xano functions or the visual builder.
- Your non-technical team members need visibility into what the function is doing.
- You want your backend to be fully consistent and transparent—useful for both AI-assisted development and long-term maintainability.
- They depend on NPM packages or external libraries.
- They perform cryptographic or computational tasks not possible with native Xano functions.
- They’re isolated, well-documented, and don’t require broader team visibility.
External API Request
Example
- Sends a POST request to the specified URL
- Includes query parameters or body data
- Sets custom headers
- Can be referenced using the alias “createUser”
Streaming API Request
Example
- Creates stream from HTTP request
- Supports SSL/TLS configuration
- Configurable timeout and redirects
- Useful for consuming streaming APIs
Streaming API Response
Example
- Streams data to client
- Supports chunked transfer
- Used in server-sent events
- Maintains open connection
Realtime Event
Example
- Sends realtime events to clients