From 02ffdb0770a09d9f9d826cc40d5a486ee305bf37 Mon Sep 17 00:00:00 2001 From: Nathan Jeon Date: Wed, 21 Jul 2021 00:06:16 +0700 Subject: [PATCH] Flask --- flaskPractice/main.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 flaskPractice/main.py diff --git a/flaskPractice/main.py b/flaskPractice/main.py new file mode 100644 index 00000000..fd25ad8a --- /dev/null +++ b/flaskPractice/main.py @@ -0,0 +1,18 @@ +# import the flask library for usage +from flask import Flask +# creat an instance of the flask server +# as the root directory within 'main.py' +app=Flask(__name__) + +#create some routes +@app.route('/') +def displayHompage(): + return "

Welcome to your first website

" + +@app.route('/route1') +def route1Info(): + return"

Congrats you made route 1

" + +# turn the server on for serving +if __name__ == "__main__": + app.run(debug=True, port=3000) \ No newline at end of file