Following instructions are tested on a clean LXC container, created by:
sudo lxc-create -n aecad -t debian -B btrfs -- -r buster --packages nano sudo tmux git
- git
- tmux
- python-pip
- bash-completion (recommended)
-
Install
nodeenv:pip install nodeenv # don't forget to add ~/.local/bin to your $PATH -
Clone this repository. Assuming you are at
~/some/path:git clone --recursive https://github.com/aktos-io/aecad cd aecad -
Create your virtual environment:¹:
For Windows platform, follow these instructions first.
$ cd ./scada.js $ make create-venv $ ./venv (scadajs1) $ exit
-
Install required packages:
$ cd .. # now you are in ~/some/path/aecad $ make install-deps
-
Open 2 different terminals and run those commands in each of them (or skip this step completely and proceed to
#6):Terminal-1:
$ ./scada.js/venv (scadajs1) $ (cd scada.js && APP=main make development)
Terminal-2:
$ ./scada.js/venv (scadajs1) $ (cd servers && ./run-ls webserver.ls --development)
-
Add the following code to the
~/.bashrc:# For Tmux VirtualEnv support tmux_get_var(){ local key=$1 [[ -n "$TMUX" ]] && tmux showenv | awk -F= -v key="$key" '$1==key {print $2}' } # activate the virtual environment if it is declared venv=$(tmux_get_var "VIRTUAL_ENV") if [ -n "$venv" ]; then OLD="$PATH" source $venv/bin/activate; export PATH="$PATH:$OLD" fi
-
Start the development anytime by:
./uidev.service`