Add unittest for function first_of_month.
[chrisu/seepark.git] / web / README
1 Needed packages: (python3-flask python3-sqlalchemy) python3-mysqldb python3-flask-sqlalchemy python3-sphinxcontrib.httpdomain
2
3 Start with:
4 FLASK_APP=seepark_web.py FLASK_DEBUG=1 SEEPARKINI=~/seewasser.ini flask run
5
6 Option:
7 -h 0.0.0.0
8 at the end to listen on all interfaces, i.e.
9 FLASK_APP=seepark_web.py FLASK_DEBUG=1 SEEPARKINI=~/seewasser.ini flask run -h 0.0.0.0
10 (or :: instead of 0.0.0.0 for ipv4+ipv6)
11
12
13 Go to:
14 http://127.0.0.1:5000/
15 or http://<ipaddress>:5000/
16 if the app is running on a different machine
17
18 ---
19
20 notes on a "production" server:
21
22 needed: python3-waitress
23
24 run (in folder web):
25 SEEPARKINI=~/seewasser.ini waitress-serve --port 8765 'seepark_web:app'
26
27 links:
28
29 http://flask.pocoo.org/docs/1.0/tutorial/deploy/
30 http://flask.pocoo.org/docs/1.0/tutorial/factory/
31 https://github.com/pallets/flask/blob/1.0.2/examples/tutorial/flaskr/__init__.py
32
33 https://docs.pylonsproject.org/projects/waitress/en/latest/
34 https://docs.pylonsproject.org/projects/waitress/en/latest/runner.html#runner
35
36 https://gr33ndata.blogspot.com/2012/01/waitress-flask.html
37
38 ---
39
40 Generate documentation:
41 cd doc
42 SEEPARKINI=~/seewasser.ini make web
43
44 ---
45
46 Execute unittests
47 SEEPARKINI=~/seewasser.ini python3 -m unittest seepark_web_tests.py