This project an example of how to make js and python clients talk to a js soket server or python socket server. You would do this when you had some master controller that you want multiple services to subscribe to ( some running in js and some in python ).
Its reccomended that you set up a viruall python envirnment. Note, in this example we use 3.10 of python
Run the following in the root of the project.
python3.10 -m venv venvThe above will set up a virtual envirnment directory. Next you simply activate it.
source venv/bin/activateThis will activate the virtual envirnment. Now all thats left is to install the dependencies
python -m pip install -r requirements.txtWith the virtual env activated we can now run the following to start the two clients and the control server
npm startBy default this will run with the js server. In order to run with the python server you can run the following command:
npm start -- --controller=pyUnder the hood this is simply running the start.sh bash script which can take a --controller argument.