Forums

New to PythonAnywhere

Im new to the site, I already have my own files and server. I have uploaded it to the website and I'm trying to figure out how to run the app. https://gyazo.com/c23e3ad5f6af812d16e9aa773f6e8755?token=1f00a7ad654a2192fdfe4ea289dab9c8

The way I usually set it up myself is through cmd I just run the script setup_db.py and then app.py and it gives me a local ip address. Im trying to figure how to host this on pythonanywhere, anything would help guys.

For your setup_db.py file, you have to integrate it within your app.py so it can be runned when pythonanywhere runs your app.py.

To run your app.py, follow these steps in this link https://help.pythonanywhere.com/pages/Flask/

Look at the image though, wouldn't it be bottle not flask. I have a bottle.py.

Oh I wasn't aware of that...

A quick look at this page- https://bottlepy.org/docs/dev/deployment.html#apache-mod-wsgi It seems that your "app" can be called using app = bottle.default_app()

With that in mind, follow the flask tutorial and instead of app = Flask(__name__), it would be app = bottle.default_app()


As like flask and other wsgi appications, you cannot have pythonanywhere webapp calling the run() function.

In flask that is app.run()

In bottle, i presume it is bottle.run().