Dion Boles

Full Stack Engineer · Healthcare & FHIR


Posts tagged #web development

Flask and Python

I’m learning how to be a full stack developer. Using Flask as a web framework and MySQL as a backend and good old HTML and jQuery as a frontend. The steps to create a website will only take a couple of minutes to make a route in flask it looks like this:

So quick start with flask:

First, you need Flask, so you can use “pip install” Flask Python 2 or
“pip3 install” Flask Python 3 and then that will install Flask in your computer. Then make a file called server.py and insert the code below:

from flask import
Flask,render_template
@app.route('/index')
def index():
 return render_template('index.html',title="data")
 if __name__ =="__main__":
 app.run(debug= True)

Your need to make an index.html and you can insert this HTML boilerplate: 

Next, just save the file, then you should go into your command line or open terminal and run python server.py or use Python3 server.py

Next copy and paste the highlighted portion of the code into your web browser and then you will get this web page!

← All posts