python --version
in a terminalyum
package manager:PIP
, the official Python package manager:hello.py
and write a few lines of code:hello.py
means:Flask
is imported and become ready to be used app
is an object constructed by Flask
libraryapp
object inherit all Flask magic@app.route
is a decorator
that define a default route for our appHello, from Flask!
will be displayed.-m
switch with Flask. Before starting the app, we should export the FLASK_APP
environment variable:http://localhost:5000
. By accessing this local address, we should see the message Hello, from Flask!