Let's make Tri-UOJ
If you have docker on your local computer, you can run
tools/startdb.sh
tools/build.sh
separately to initialize the project.
TUOJ web server depends on npm
, bower
, grunt-cli
.
By default, you should concat client files using grunt.
You should run following commands to initialize the app.
Install npm
sudo apt-get install nodejs npm mongodb # maybe other packman tools
Install nrm and nrm to switch your npm source to taobao (which is faster)
sudo npm install -g nrm
nrm use taobao
Install packages
cd ./oj
npm install
sudo npm install -g bower grunt-cli
bower install
There is no user by default, while registeration is not allowed currently.
Therefore, you should run
node oj/tools/initdb.js
to create a user with both his username and passwrod set as root
.
You may change that script to register more users.
We have a docker-compose
startup config file. You may run
tools/compose.sh
to start two docker containers.
You need to start mongodb server manually if needed (on mac and windows for example).
It is usually not needed on linux. You may run mongo
to test if you already have had a mongodb server running.
mongod
And then start the nodejs app by running
cd ./oj
grunt