项目作者: twyla-ai

项目描述 :
Twyla HTTP Integration Middleware Template
高级语言: Python
项目地址: git://github.com/twyla-ai/http-middleware-zeit-template.git
创建时间: 2019-10-01T10:27:32Z
项目社区:https://github.com/twyla-ai/http-middleware-zeit-template

开源协议:MIT License

下载


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