Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuzhanglong/yujudge
💡 An online judge system based on React & TypeScript, with complete secondary development documents
https://github.com/yuzhanglong/yujudge
antd onlinejudge react typescript
Last synced: 3 months ago
JSON representation
💡 An online judge system based on React & TypeScript, with complete secondary development documents
- Host: GitHub
- URL: https://github.com/yuzhanglong/yujudge
- Owner: yuzhanglong
- License: mit
- Created: 2020-07-17T11:29:22.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-20T05:38:29.000Z (almost 3 years ago)
- Last Synced: 2023-03-06T01:44:21.342Z (almost 2 years ago)
- Topics: antd, onlinejudge, react, typescript
- Language: TypeScript
- Homepage: http://docs.yuzzl.top
- Size: 2.98 MB
- Stars: 20
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### 快速上手
[点击访问](https://yu-judge.vercel.app/)
### 在线DEMO
[测试网站](http://oj.yuzzl.top/)
[CodeSandbox(可修改代码实时预览)](https://codesandbox.io/s/adoring-blackburn-ru7kr)### 调试与部署
项目打包基于**webpack**,当前分支已经运行了`yarn eject`,webpack配置需要开发者自行管理。
webpack配置文件位于`config/webpack`目录之下。
yarn脚本文件位于`script`目录之下。
### 安装
```shell
yarn install
```### 安装无法运行可以尝试(node-sass安装的问题)
```
npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
yarn install
```### 开发环境运行
```shell
yarn start
```### 生产环境打包
```shell
yarn build
```### 带外链的生产环境打包
打开`package.json`,修改 **buildWithPrefix**
```json {5}
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js",
"buildWithPrefix": "node scripts/build.js http://cdn.yuzzl.top(你的外链地址)",
"upload": "node scripts/upload.js"
}
```执行
```shell
yarn buildWithPrefix
```此时打包出来的所有js、css、图片(public文件夹内的静态文件除外)等依赖,均指向你的**外链地址**而不是`build`文件夹的根目录。
### 集成七牛存储服务
如果你使用七牛的云存储服务来保存静态文件的话,你可以试试:
打开`script/upload.js`, 找到下面内容,按照注释进行修改
```javascript
// 上传凭证以及配置
const ACCESS_KEY = 'o4fgM7P2lPEyo3已经作废FZ7s_NGdo_xJVNDdKf55apCubX';
const SECRET_KEY = 'YxRkcS8o-GSLMo1已经作废ajWuLjeFxFsMo1WKnOvyrLjB8';
// bucket
const options = {
scope: "yzlyz已经作废l123",
};
// 空间对应的机房
config.zone = uploader.zone.Zone_z2;
```带外链打包
```shell
yarn buildWithPrefix
```执行上传脚本
```shell
yarn upload
```
所有css、js等静态文件会被**自动上传至七牛服务器**,你只需要将**index.html**、一些图标文件传上服务器进行托管即可。### 它是如何工作的?
请参考[这篇文章](https://www.zhihu.com/question/20343652/answer/1327243865)
### 另请参阅
服务端:https://github.com/yuzhanglong/YuJudge-JudgeServer
判题机:https://github.com/yuzhanglong/YuJudge-JudgeHost
判题核心:https://github.com/yuzhanglong/YuJudge-Core
### 版本日志
最新版本 `1.0.0`
#### 1.0.0
发布前后端项目至GitHub