- Sites that the player supports:
- Synchronization of the following actions:
- Play
- Pause
- Rewind
- Synchronization of the video player time during playback and rewind events.
- Chat, as well as its overlay version (pc only) when the player is opened full screen.
- Open
cmd
. - Type in the command:
pip install virtualenv
- Go to the
backend
folder:
cd path/to/folder
- Create a virtual environment:
virtualenv venv
- Activate the virtual environment:
Windows:
call venv/Scripts/activate
Linux:
source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Replace the host, port, and origin fields with your own in the file
backend/src/misc.py
. - Start the server with the command:
Windows:
set PYTHONPATH=path/to/varus/project && python path/to/app.py
Linux:
PYTHONPATH=path/to/varus/project python path/to/app.py
- Open
cmd
. - Go to the
frontend
folder:
cd path/to/folder
- Install the modules:
npm install
npm install --global serve
- Replace the backend url field in the file
frontend/src/globals.js
. - Create an application build:
npm run build
- Start the application:
serve -s path/to/frontend/folder/dist -l 5000
To avoid starting the application manually after every server reboot, you can create services.
- Open
cmd
. - Go to the
system
folder:
cd /etc/systemd/system/
- Create a backend service file:
nano varus.backend.service
- Paste the service code and replace the paths in it:
[Unit]
Description=Varus backend service
After=network.target
[Service]
User=root
Group=root
WorkingDirectory=/root/varus
Environment="PATH=/root/varus/backend/venv/bin"
Environment="PYTHONPATH=/root/varus"
ExecStart=/root/varus/backend/venv/bin/python /root/varus/backend/src/app.py
[Install]
WantedBy=multi-user.target
- Save all and close the file.
- Create a frontend service file:
nano varus.frontend.service
- Paste the service code and replace the paths in it:
[Unit]
Description=Varus frontend service
After=network.target
[Service]
User=root
Group=root
WorkingDirectory=/root/varus/frontend/dist
ExecStart=/usr/bin/serve -s /root/varus/frontend/dist -l 80
[Install]
WantedBy=multi-user.target
- Save all and close the file.
- Reload daemon:
systemctl daemon-reload
- Enable services:
systemctl enable varus.backend.service
systemctl enable varus.frontend.service
- Start services:
systemctl start varus.backend.service
systemctl start varus.frontend.service
- Check if services are running:
systemctl status varus.backend.service
systemctl status varus.frontend.service