1

I have a flask app that mounted on fastapi like this :

from fastapi import FastAPI
`from flask import Flask
from fastapi.middleware.wsgi import WSGIMiddleware

fastapi = FastAPI()
app = Flask(__name__)
fastapi.mount("/", WSGIMiddleware(app=app))

i try to run it in passenger_wsgi with following command but its dosent work how can i deploy my project ?

from a2wsgi import ASGIMiddleware
from app import fastapi  

application = ASGIMiddleware(fastapi)
  • 1
    why are you mixing flask and fastapi? seems like a weird thing to do... – ThiefMaster Apr 25 '23 at 18:14
  • i wanyt to have a ready to use docs for my api session thats why i mix flask with fastapi – Pourya Mohamadi Apr 25 '23 at 18:15
  • Does this answer your question? [Mounting Flask app in FastAPI raises a 404 Not Found error response](https://stackoverflow.com/questions/76057185/mounting-flask-app-in-fastapi-raises-a-404-not-found-error-response) – Chris Apr 25 '23 at 18:34
  • this was my question and you help me to fix it now my applicatin works fine on local but now i want to deploy it and i have cpanel and i cant run it there i get following error in my log file [UID:2371][4893] Child process with pid: 5062 was killed by signal: 15, core dumped: no – Pourya Mohamadi Apr 25 '23 at 18:42

0 Answers0