app = flask.Flask(__name__) # Put above function definitions.
app.run(host=None, port=None, debug=None) # Run after function definitions.
```
```
* **Starts the app at `'http://localhost:5000'`. Use `'host="0.0.0.0"'` to run externally.**
* **Starts the app at `'http://localhost:5000'`. Use `'host="0.0.0.0"'` to run externally.**
* **Install a WSGI server like [Waitress](https://flask.palletsprojects.com/en/latest/deploying/waitress/) and a HTTP server such as [Nginx](https://flask.palletsprojects.com/en/latest/deploying/nginx/) for better security.**
* **Install a WSGI server like [Waitress](https://flask.palletsprojects.com/en/latest/deploying/waitress/) and a HTTP server such as [Nginx](https://flask.palletsprojects.com/en/latest/deploying/nginx/) for better security.**
@ -2561,7 +2561,7 @@ def serve_html(sport):
* **Use `'render_template(filename, <kwargs>)'` to render file located in templates dir.**
* **Use `'render_template(filename, <kwargs>)'` to render file located in templates dir.**
* **To return an error code use `'abort(<int>)'` and to redirect use `'redirect(<url>)'`.**
* **To return an error code use `'abort(<int>)'` and to redirect use `'redirect(<url>)'`.**
* **`'request.args[<str>]'` returns parameter from the query string (URL part after '?').**
* **`'request.args[<str>]'` returns parameter from the query string (URL part after '?').**
* **Use `'session[key] = value'` to store session data like username, etc.**
<pre><codeclass="python language-python hljs">app = flask.Flask(__name__)<spanclass="hljs-comment"># Put above function definitions.</span>
app.run(host=<spanclass="hljs-keyword">None</span>, port=<spanclass="hljs-keyword">None</span>, debug=<spanclass="hljs-keyword">None</span>)<spanclass="hljs-comment"># Run after function definitions.</span>
</code></pre>
</code></pre>
<ul>
<ul>
<li><strong>Starts the app at <codeclass="python hljs"><spanclass="hljs-string">'http://localhost:5000'</span></code>. Use <codeclass="python hljs"><spanclass="hljs-string">'host="0.0.0.0"'</span></code> to run externally.</strong></li>
<li><strong>Starts the app at <codeclass="python hljs"><spanclass="hljs-string">'http://localhost:5000'</span></code>. Use <codeclass="python hljs"><spanclass="hljs-string">'host="0.0.0.0"'</span></code> to run externally.</strong></li>
<li><strong>Use <codeclass="python hljs"><spanclass="hljs-string">'render_template(filename, <kwargs>)'</span></code> to render file located in templates dir.</strong></li>
<li><strong>Use <codeclass="python hljs"><spanclass="hljs-string">'render_template(filename, <kwargs>)'</span></code> to render file located in templates dir.</strong></li>
<li><strong>To return an error code use <codeclass="python hljs"><spanclass="hljs-string">'abort(<int>)'</span></code> and to redirect use <codeclass="python hljs"><spanclass="hljs-string">'redirect(<url>)'</span></code>.</strong></li>
<li><strong>To return an error code use <codeclass="python hljs"><spanclass="hljs-string">'abort(<int>)'</span></code> and to redirect use <codeclass="python hljs"><spanclass="hljs-string">'redirect(<url>)'</span></code>.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'request.args[<str>]'</span></code> returns parameter from the query string (URL part after '?').</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'request.args[<str>]'</span></code> returns parameter from the query string (URL part after '?').</strong></li>
<li><strong>Use <codeclass="python hljs"><spanclass="hljs-string">'session[key] = value'</span></code>to store session data like username, etc.</strong></li>