8000 GitHub - wongdark2017/PutongOJ at v1 · GitHub
[go: up one dir, main page]

Skip to content
7FFF
wongdark2017Public
forked from acm309/PutongOJ

About

Putong Online Judge -- An online judge with nothing special

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Putong OJ

node version Operating System

DEMO

Version 2 is under development

Installation

前提

本 OJ 仅适用于 Linux 平台

安装 Node.js

要求 Node.js 版本大于等于 7.6.0。如果低于此版本,就请更新。

如果没有安装过 Node.js,可以参考 官网 或这篇 博客。

安装依赖

在项目的根目录处

npm i

安装 redis

参考 官网 即可安装, 并用 redis-server 启动它

安装 mongodb

仍然安装 官网 安装即可,并用 mongod 启动它

编译判题端

cd data/Judger
g++ core.cpp -o Core -O2

恢复数据

在 data/DB 下有一份默认的数据,可以考虑使用

cd data/DB
mongorestore --db oj --drop oj

启动

config

配置 config/index.js 文件

主要是以下几个属性需要特别注意

port: 3000 // 服务端的端口
redisUrl: 'redis://localhost:6379' // redis 的连接字符串
mongoUrl: 'mongodb://localhost:27017/oj' // mongodb 的连接字符串

Start

输入以下命令及启动

npm run start

判题端

cd data/Judger
sudo node judger.js
# 需要 root 权限
cd data/RanklistUpdater
node updater.js

初始用户

默认的 admin 用户密码为 kplkplkpl。请务必在使用后立即更改。

TODO

  • 说明文档
  • 开发文档
  • 打包成 docker

About

Putong Online Judge -- An online judge with nothing special

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0