X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/blobdiff_plain/a61d8c6406e1a7724c8c55e96f0e372eaea86b20..cd14da74ff0e9262da8f61669850406f532570bc:/web/README diff --git a/web/README b/web/README index 2b6b555..0dd0ca6 100644 --- a/web/README +++ b/web/README @@ -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,32 +21,8 @@ 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: -SEEPARKINI=~/seewasser.ini waitress-serve --port 8765 --call 'web.seepark_web:create_app' - +run (in folder web): +SEEPARKINI=~/seewasser.ini waitress-serve --port 8765 'seepark_web:app' links: @@ -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