**Bottle is a micro web framework/server. If you just want to open a html file in a web browser use `'webbrowser.open(<path>)'` instead.**
**Flask is a micro web framework/server. If you just want to open a html file in a web browser use `'webbrowser.open(<path>)'` instead.**
```python
```python
# $ pip3 install bottle
from bottle import run, route, static_file, template, post, request, response
import json
# $ pip3 install flask
from flask import Flask, send_from_directory, render_template_string, request
```
```
### Run
```python
```python
run(host='localhost', port=8080) # Runs locally.
run(host='0.0.0.0', port=80) # Runs globally.
app = Flask(__name__)
app.run()
```
```
* **Starts the app on `'http://localhost:5000'`.**
* **You will need 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/) to run globally.**
<div><h2id="web"><ahref="#web"name="web">#</a>Web</h2><p><strong>Bottle is a micro web framework/server. If you just want to open a html file in a web browser use <codeclass="python hljs"><spanclass="hljs-string">'webbrowser.open(<path>)'</span></code> instead.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install bottle</span>
<spanclass="hljs-keyword">from</span> bottle <spanclass="hljs-keyword">import</span> run, route, static_file, template, post, request, response
<spanclass="hljs-keyword">import</span> json
<div><h2id="web"><ahref="#web"name="web">#</a>Web</h2><p><strong>Flask is a micro web framework/server. If you just want to open a html file in a web browser use <codeclass="python hljs"><spanclass="hljs-string">'webbrowser.open(<path>)'</span></code> instead.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install flask</span>
<li><strong>Starts the app on <codeclass="python hljs"><spanclass="hljs-string">'http://localhost:5000'</span></code>.</strong></li>
<li><strong>You will need a WSGI server like <ahref="https://flask.palletsprojects.com/en/latest/deploying/waitress/">waitress</a> and a HTTP server such as <ahref="https://flask.palletsprojects.com/en/latest/deploying/nginx/">nginx</a> to run globally.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'render_template()'</span></code> accepts filename of a template stored in 'templates' directory.</strong></li>
<li><strong>To get a parameter from the query string (part after the ?) use <codeclass="python hljs"><spanclass="hljs-string">'request.args.get(<str>)'</span></code>.</strong></li>