git clone https://github.com/HydLa/webHydLa.git
cd webHydLaExecute docker-compose up and open http://0.0.0.0:5000/
- Software:
- node 15 or later, and npm 7 or later
- Python 3.3 or later
To install node (Node.js), you should use some version manager of Node.js such as nvm, n, and so on.
The node command from apt or other OS-standard package managers may often be outdated.
- Install nvm (node version manager).
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash - Install the latest version of node.
nvm install node
- Check that you can use
nodeandnpmcommands.node --version npm --version
- Install packages and build from source with following commands.
pip3 install -r requirements.txt npm install npm run build
- The session of webHydLa is encrypted with a secret key.
To set the key, run a command such as,
cat /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 10 | head -1 > secret_key
- Execute
server.py, then webHydLa will start on http://0.0.0.0:5000/. (If the port has been already in use, it will use another port.)python3 server.py
If you want to specify which hylagi to use, put a file named hylagi_path containing the absolute path to hylagi.
echo "/path/to/hylagi" > hylagi_pathWhen webHydLa needs to execute HyLaGI, it will try in the following order:
- If
hylagi_pathfile exists, it will execute the HyLaGI specified in the file. - If
hylagicommand can be found inPATH, it will execute the command. - Otherwise, it will POST a request to the API server.
npm run lintnpm run formatnpm tnpm run docHere is the generated document
そのままだと怒られる(いまいち理由はよくわかっていない)ので, typedoc-plugin-missing-exports を用いている.
client side
- src/ and static/
server side
- server.py
client (src/ and static/) server.py chaource (API server)
| | |
write down hydla code | |
press button "run" | |
----------------------> if the local machine |
| has hylagi |
| then |
| <----- run on the machine |
| else |
| run with chaource -------->
| run hylagi
render the result <----------------------------------
as a graph
web 上のエディタで hydla コードを入力させ, run ボタンを押されると server.py(サーバサイド)と通信して サーバサイドで hylagi を実行する. hylagi の実行が終わると,結果(hydat)を受信し,グラフとして描画する.

