ondrejsika.com

flask-server documentation

Simple HTTP server with Jinja2 templates based on Flask

Authors

Ondrej Sika ondrejsika.com dev@ondrejsika.com

Source

Documentation ondrejsika.com/docs/flask-server
Python Package Index pypi.python.org/pypi/flask-server
GitHub github.com/sikaondrej/flask-server

Instalation

Instalation is very simple over pip.
# pip install flask-server

Create web server

$ cd /path/to/web
$ flask-server init
or
$ flask-server init /path/to/web

run

$ python wsgi.py

Usage

Urls

file structure
templates/index.html
templates/about.html
templates/projects/index.html
templates/projects/project1.html
templates/projects/project2.html
urls structure
/
/about/
/projects/
/projects/project1
/projects/project2

Templates

Templates supports Jinja2. jinja.pocoo.org/docs/