A server is software running on a computer that provides functionality to other applications across a network. It is the software—not special hardware—that makes the computer a server. Running a web application on your own computer is enough to put it in that role. section 6.2
In the client-server model, several clients can use one central server. A web server responds to HTTP requests from clients such as browsers. The browser interprets a returned HTML document as a page; links in that page can trigger further requests for CSS, JavaScript, and other content. section 6.2 section 6.3
In the request-response model, the server processes a client's request and sends back a response rather than acting on its own. It may retrieve database data to compose a page, then serve linked files as the browser requests them. Keeping the application on a central server also lets an update become available to users without distributing new software to each computer. section 6.2.1 section 6.1.1
from flask import Flask #1
app = Flask(__name__) #2
@app.route("/") #3
def home(): #4
return "Hello World!"
This small Flask application creates a server-backed route at `/` whose response is `Hello World!`. It is a starting point for seeing a browser request reach application code. section 6.4.2
Run the Flask example with `flask run`, then visit `http://127.0.0.1:5000` in a browser. The process waits for requests until stopped. Flask's built-in development server is useful locally, but is not secure or optimized enough for a publicly available production application. section 6.4.2










