Get the latest version of Python https://www.python.org/downloads/
Install Pip https://pip.pypa.io/en/stable/installation/
Install flask in your terminal with pip3 install Flask
Get Postman to test your endpoints https://www.postman.com/downloads
Create a new file called app.py by doing cat > app.py
Paste into your app.py the code below to achieve a "Hello world display"
# Importing flask
from flask import Flask
app = Flask(__name__)
# Using a route decorator
@app.route('/')
def hello_world():
return "Hello World!"
# Used to show error messages to make debugging easier
if __name__ == "__main__":
app.run(debug=True)
# Starting the server for the application on port 5000
app.run(port=5000)
In your terminal, run python3 app.py
this would start up your server.
To view the output on the browser, visit http://localhost:5000/