To create a Flask app in Python, you can follow these steps:
Install Flask by running pip install flask
in your command prompt or terminal.
Create a new Python file called app.py
(or any other name you like) and import Flask:
main.py46 chars3 lines
main.py56 chars4 lines
main.py41 chars3 lines
http://localhost:5000
(or any other port number that you specified in the app.run()
method).You should see the message "Hello, World!" displayed in your browser. You can now add more routes and functionality to your app as needed.
gistlibby LogSnag