Jun-21-2023, 05:47 AM
(This post was last modified: Jun-21-2023, 05:48 AM by Zachary1234.)
I have been doing an online Python Tutorial at https://www.youtube.com/watch?v=B9nFMZIYQl0 at about [5:32:59 / 11:34:48]. I am trying to get the following file, script.py to run an app that will show up in Firefox. But I can't get it to show up in my Firefox Web Browser. Apparently there is a Server for the App involved, which from the software the tutor is using is <<cmd> + <enter>>, and seems to be using a web page editor called "replit", however that links to a server. It is possible that the tutor is using Flask to acheive all this. What do I need to do to get my browser to open and run the App, to show me something graphical, locally without replit to my 127.0.0.1, for example? As a beginner, what needs to be done, locally on my own PC, step by step?
import script from script import home_page, app, show, db database = {'number': 0} @app.rounte('/') def home(): return show('home_page') @app.rounte('/increment') def increment(): database['number'] return 'increment' app.run(host='0.0.0.0', port=81)