Skip to content

How to deploy as a web application? #213

Answered by FabienArcellier
crxi asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @crxi,

That great you find a way to run it on Renders.

I have already noticed this problem in #186 (comment). I did not document it and I did not open an issue to fix it. We use a FastAPI mechanism called lifespan which is incompatible with sub asgi application.

We need to adapt your code to make your program work. Cloud you try that and tell me if it's work fine ?

import argparse
from contextlib import asynccontextmanager

import uvicorn
import streamsync.serve
from fastapi import FastAPI, Response

parser = argparse.ArgumentParser(description='serve.py')
parser.add_argument('--loglevel', type=str, default='info',
                    help='Log level for the server script')
args = parser.

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@crxi
Comment options

@FabienArcellier
Comment options

Answer selected by crxi
@crxi
Comment options

@FabienArcellier
Comment options

@crxi
Comment options

@ramedina86
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #212 on January 29, 2024 10:19.