[go: up one dir, main page]

Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

twyla-ai/http-middleware-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twyla HTTP Integration Middleware Template: Zeit Now

This is a template repository to build Twyla HTTP integration middleware services for deployment on ZEIT Now. These services allow for flexible integrations with third-party services and data sources within your conversations designed using Twyla Canvas.

This could also be used as an example for deployment of Starlette ASGI application on Zeit.

Quick Start

Note that we assume you already have a ZEIT Account that is linked to your GitHub account.

  1. Create a GitHub repository using this template.
  2. Import your new repository as a new project in ZEIT.

That should be it. ZEIT should have a deployment built and ready for you in no time.

Notes

  • The now.json file is not strictly required as this will work with zero-config as well. We use this to enable some route redirection.
  • Since ZEIT passes the path as is to the application, the application should handle path prefixes like /api.
  • Endpoints deployed here are not secured. This means, they rely on obscurity or the deployment URL to remain private. If endpoints do need to be secured, look into how to integrate with a stateless authentication mechanism/service (eg: auth0). Alternatively, allow for Authorization headers or tokens to be passed through to the backing service or data source.

References