the Online Judge for Changjun Middle School
- install nodejs(need ES6 support, ver >= 0.11 required), npm, mongodb by your package manager
- run
npm installat current directory. It's recommended since Mongoose/bcrypt need to be compiled - run
npm run server
To make live easier, you can install some other packages:
LiveScript: to compile the LiveScript code to JavaScript code. then runlsc -wco . srcto watch and compile the LiveScript codes.nodemon: to automatically restart server. runnodemon --harmony bin/server.jsinstead ofnode --harmony bin/server.js
npm run serverto run serverwebpackto watch JS files in client side
- create an empty round without any problems; keep the round id in this step.
- create problems as you like; remember to set round id when creating;
- that's it!
I give up. The solution is... to create the same problem twice!
The problem is that we don't know when to cancel a problem, i.e., when to delete the rid attribute of this problem. And I think there should be duplicated problems, even if I add the feature that we can reuse problems in different rounds.
If you want, you can delete this attribute (the rid attr for each problem) manually, and then you can reuse it. To make it more handy, there is one API named round.publish which releases all problems in this round.
Each resource is managed by a binary code ABC, while A indicates the permission of the owner, and B indicates that of the users in this group, and C is that of everyone.
r: get descriptions
w: change descriptions
x: submit
Visit http://jsonapi.org/ to find more details.