diff --git a/README.md b/README.md index 835b7342b27da1929691a11c52c575e0ad4be3d1..2efe7351a0d2193b448207c13eb834aac04dbff5 100644 --- a/README.md +++ b/README.md @@ -287,3 +287,61 @@ npm run serve ``` The histogram we showed in the article "Progressive Visualization of Electronic Health Record Sequences at Country-Scale" comes from that D3.js software. + + + +### Running Parcoursvis in local computer using ssh + +To run parcoursvis in your local computer using SSH: + +In order to properly run the system, you need to run two things: frontend that shows the web, and the backend that generates the data. + +So, the strategy is to communicate all the data in your computer’s LOCAL SERVER. + +So, turn on two terminals, and do the following: + +In the first terminal, write: + +$ ssh -L 5678:localhost:5678 sshin@192.168.113.88 (if 5678 is occupied, use another port instead) + +Then, you should let the other server know that you changed the port. + +So, go to parcoursvis (cd parcoursvis) +$ vi ./front/.env.local + +VUE_APP_SERVER_PREFIX=/ +VUE_APP_IP_VM=127.0.0.1 +VUE_APP_PORT_VM_WSS=443 +VUE_APP_PORT_VM_WS=5555 <— update this number!!!! + +$wq (save and get out) +Then, go to /back/parser/index.py and change the port number. +Go to parcoursvis (cd parcoursvis) + +$ cd back +$ cd parser +$ vim index.py + +async def main(): + async with websockets.serve(handler, "0.0.0.0", 5555): <—— change here!!! + await asyncio.Future() #Runforever, see https://websockets.readthedocs.io/en/stable/ + +$wq + +Then, + +$conda activate parcoursvis +$cd parcousvis +$ cd back +$ python index.py test10000 & +Then it will work. + +In the second terminal, write: +$ ssh -L 8080:localhost:8080 sshin@192.168.113.88 +$ conda activate parcoursvis +$ cd parcoursvis +$ unset HOST +$ cd front +$ npm run serve + +Then, go to the network http://localhost:8080