Skip to content
Snippets Groups Projects
README.md 1.39 KiB
Newer Older
Nils G.'s avatar
Nils G. committed
## Lynchburg Server

This is a web2py application (python3) http://www.web2py.com/init/default/download

Installation:
1) Make sure python3 is installed on your system and in your $PATH
1) Download web2py (the latest "source code" version for "normal users") and extract it.
1) Start web2py
1) Log-In with your specified admin password
1) Create a web2py 'application' by cloning this repository

### Websockets
To communicate with the WebClients directly the server uses websockets. To make this communication works, you have to also start the websocket server that web2py comes with and run it on port ``8888``. If you do not run the websockets server, the application will mostly function but no push packets will be send to clients and you have to manually refresh the site everytime. This is how you can do it:

1) Copy the ``websocket_messaging.py`` into the root folder of web2py (The same folder web2py.py is in. NOT your application root folder)
    ```
    cp ./gluon/contrib/websocket_messaging.py ./
    ```
1) Run the websocket server seperate to web2py using:
    ```
    python ./websocket_messaging.py -k <KEY> -p 8888
    ```
    the hmac hardcoded into this app is ``67c371fd204fbcbf9742310d1a9d951bcca1aa86``
1) If you run web2py with https enabled, you MUST also provide the certificat to the websockets server (Provide the path). More help via:
    ```
    python ./websocket_messaging.py --help
    ```