Basic Flask WHY FLASK Link
Flask is a app server using python. To get started, there are a few modules you should import:
from flask import Flask from flask import send_file
The first one will allow us to use flask, and the next one will allow us to send files
Now, we have to define our app.
app = Flask('app')
Now, a port(link here) has to be added with
Now, we have to send the files with
@app.route('/'): def main(): return ('hello world')
If you have followed correctly, you should have a pretty basic hello world send. Now, we need to start sending files.
return ('hello world')
Now, we need to create an html file named 'index.html'.
This should now render the html file. Good Job! You have successfully created your first flask app. Edit the html file to change the text inside.