Use Python, Flask and MySQL to create a simple web application where users can register, sign in and create their bucket list.
Setting Up Flask
Setting up Flask is pretty simple and quick. With pip package manager, all we need to do is:
- Install flask
pip install flask
- Create a file called app.py. Import the flask module and create an app using Flask as shown:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def main():
return "Welcome!"
if __name__ == "__main__":
app.run()
Save the changes and execute app.py:
python app.py
Point your browser to http://localhost:5000/ and you should have the welcome message.
Good work, looking forward for the whole series example code.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit