Create a Simple Flask App #1

Create a Simple Flask App #1
[sourcecode] #Lets create a simple flask app
# only get method and hello world app
#lets import flask but you need to install flask by "pip install flask"
from flask import Flask
#Now Lets create app
app = Flask(__name__)
#Lets create our first route
@app.route(‘/’)
#Now I will create a function
def hello():
return "Hello World"

#lets run our app in debug mode and port will be 8080
app.run(debug=True, port=8080)
#lets run over app in terminal and check in browser
[/sourcecode]

you can get github code here

Tony BB
 

TonyBB is a Coach , marketer, hypnotist and a founder of RSKVF Production who specializes in providing simple, affordable, and easy to use solutions for Life.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: