How to create two flask apps in pythonanywhere_com_wsgi.py?

42 views Asked by At

I am using pythonanywhere.com to host my Python. app1 is successfully running but I am getting a 404 error when I call app2 . How do I create two applications?

import sys

project_one = '/Projects/One'
if project_one not in sys.path:
    sys.path = [project_one] + sys.path

from one import app1 as application

project_two = '/Projects/Two'
if project_two not in sys.path:
    sys.path = [project_two] + sys.path

from two import app2 as new_application
1

There are 1 answers

0
caseneuve On

If you want to host multiple web apps, you need to upgrade your account and add more web apps to it, then deploy each web app on the Web page separately.