]> ToastFreeware Gitweb - chrisu/seepark.git/blobdiff - web/README
Add unittest for function first_of_month.
[chrisu/seepark.git] / web / README
index 30797ed2a2634783e1a41fe7901c21349b84ee58..0dd0ca6bc4a68e946556b09acd58c6c8fe7e5f9c 100644 (file)
@@ -1,4 +1,4 @@
-Needed packages: (python3-flask python3-sqlalchemy) python3-mysqldb python3-flask-sqlalchemy
+Needed packages: (python3-flask python3-sqlalchemy) python3-mysqldb python3-flask-sqlalchemy python3-sphinxcontrib.httpdomain
 
 Start with:
 FLASK_APP=seepark_web.py FLASK_DEBUG=1 SEEPARKINI=~/seewasser.ini flask run
@@ -21,33 +21,9 @@ notes on a "production" server:
 
 needed: python3-waitress
 
-version 1:
-
-1) add to web/seepark_web.py:
-from waitress import serve
-
-if __name__ == "__main__":
-    #app.run()
-    serve(app, listen='*:5000')
-
-2) run:
-SEEPARKINI=~/seewasser.ini python3 web/seepark_web.py
-
-version 2:
-
-1)
-touch web/__init__.py
-
-2)
-add to web/seepark_web.py:
-def create_app():
-    return app
-
-3)
 run (in folder web):
 SEEPARKINI=~/seewasser.ini waitress-serve --port 8765 'seepark_web:app'
 
-
 links:
 
 http://flask.pocoo.org/docs/1.0/tutorial/deploy/
@@ -58,3 +34,14 @@ https://docs.pylonsproject.org/projects/waitress/en/latest/
 https://docs.pylonsproject.org/projects/waitress/en/latest/runner.html#runner
 
 https://gr33ndata.blogspot.com/2012/01/waitress-flask.html
+
+---
+
+Generate documentation:
+cd doc
+SEEPARKINI=~/seewasser.ini make web
+
+---
+
+Execute unittests
+SEEPARKINI=~/seewasser.ini python3 -m unittest seepark_web_tests.py