Go to file
Bálint Bokros 7e79c22437 Implement frontend dependency management 2017-12-11 17:37:21 +01:00
lib Implement frontend dependency management 2017-12-11 17:37:21 +01:00
src Implement frontend dependency management 2017-12-11 17:37:21 +01:00
.gitignore Implement frontend dependency management 2017-12-11 17:37:21 +01:00
.pyenvrc Rearrange project and dockerize 2017-11-27 21:09:56 +01:00
Dockerfile Rename lib folder's envvar 2017-12-05 12:48:01 +01:00
README.md Implement frontend dependency management 2017-12-11 17:37:21 +01:00
supervisord.conf Rename event_handler_example to event_handler_main 2017-12-04 21:50:41 +01:00

README.md

Tutorial Framework

Frontend dependencies

Open up a terminal in src/app/static. Issue yarn install to install dependencies and webpack to compile the frontend source.

Building and running with Docker

Simply issue docker build . in the root of the project. The first build could take a while as it's compiling a fresh Python package from source. Subsequent builds can reuse this layer, so their execution time is significantly shorter.

Run with docker run -p 4242:4242 <id> to bind the container's port to localhost.

Running locally

Create a new virtualenv, preferably with virtualenvwrapper. Install the dependencies with pip install tornado pyzmq transitions. If using virtualenvwrapper, issue add2virtualenv lib from the project root to add the local libraries to the virtualenv's PYTHONPATH.

To start the project issue

cd src/app/
python app.py

in one terminal, and

cd src/components/
python event_handler_main.py

in another. Prepend the python commands with PYTHONPATH="../../lib/" if the folder weren't added to the PYTHONPATH permanently.