It's an "online judge system" based on vue2 and elements-ui
-
How does it works?
It's easy. Backend is in the
backend
directory, it's an api server. Frontend is in thefrontend
directory, it serves requests from web-server. It also can work with electron. -
Setup
- Install the necessary libraries with pip:
pip3 install flask flask_cors requests
- Install the judger for judge machine follow the instructions
git clone https://github.com/QingdaoU/Judger.git cd Judger sudo apt-get install libseccomp-dev mkdir build && cd build && cmake .. && make && sudo make install cd bindings/Python ; sudo python setup.py install
- Setup web interface on web interface machine
sudo apt install nginx nodejs -y cd path/to/zqhf-oj-v2/frontend ; npm install cd path/to/zqhf-oj-v2/scripts sudo ./daemon.py install page sudo ./daemon.py install nginx sudo service nginx restart
-
Install the new spj backend according to the document.
-
Initialize and start api
On web interface machine:
cd path/to/zqhf-oj-v2/scripts cd path/to/zqhf-oj-v2/backend/src python3 > import backend > backend.connect_db() > backend.init_db() ./daemon.py start api
Edit your
path/to/zqhf-oj-v2/backend/src/config.json
on your web interface machine. Change the settings, likeweb-server-port
,web-server-address
andjudge-server-address
.On judge machine:
cd path/to/zqhf-oj-v2/scripts ./daemon.py start judge