Code Monkey home page Code Monkey logo

codeview's Introduction

codeview

在线编程笔试平台。

codeview's People

Contributors

dd20-dai avatar dependabot[bot] avatar halomai avatar mousehappy123 avatar scutcs3-cloud avatar timmmza avatar tootal avatar whypac avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

codeview's Issues

允许本地调试无数据库

目前后端调试如果本地没有配置数据库环境无法运行,预期改成报错,而不是直接崩溃。

~/codeview/backend % npm run serve

> [email protected] serve
> node ./bin/www

http://localhost:8080
undefined
[SELECT ERROR]: connect ECONNREFUSED 127.0.0.1:3306
/Users/bytedance/codeview/backend/routes/problems.js:13
            data: result[0],
                        ^

TypeError: Cannot read property '0' of undefined
    at Query.<anonymous> (/Users/bytedance/codeview/backend/routes/problems.js:13:25)
    at Query.<anonymous> (/Users/bytedance/codeview/backend/node_modules/mysql/lib/Connection.js:526:10)
    at Query._callback (/Users/bytedance/codeview/backend/node_modules/mysql/lib/Connection.js:488:16)
    at Query.Sequence.end (/Users/bytedance/codeview/backend/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)
    at /Users/bytedance/codeview/backend/node_modules/mysql/lib/protocol/Protocol.js:404:18
    at Array.forEach (<anonymous>)
    at /Users/bytedance/codeview/backend/node_modules/mysql/lib/protocol/Protocol.js:403:13
    at processTicksAndRejections (internal/process/task_queues.js:75:11)

axios错误处理

捕获请求时4xx、5xx错误码,避免在控制台打印错误信息。

添加概况页面

登陆后需要有一个页面查看情况,暂定为概况(Overview)页面。

实现注册页面逻辑

  • 跳转登陆页面
  • 按照接口请求注册数据
  • 处理异常(如用户已存在)
  • 同样保存token(参考登陆界面)
  • 注册完成后跳转到面试者界面(暂时)

新建题目页面

包含两个部分:控制台新建题目到题库、面试官界面新建题目。

其中面试官界面新建题目应该要能搜索已有题目、或者直接添加新题目。

实现登陆界面逻辑

  • 按照接口请求token
  • 处理异常(密码错误)
  • 保存token到本地
  • 跳转注册页面
  • 找回密码(暂时不做,可以把入口隐藏了)
  • 登陆后跳转到面试者界面(暂时)

对接API接口

  • 接口部分放到src/api文件夹下。
  • 预期能通过openapi校验接口实现。

Mock数据

  • 登陆、注册
  • 题目列表
  • 面试留言

编译器代码同步

预计先实现好面试者提交代码,面试官这边能看到提交的代码。
实现完后再考虑面试官或者面试者其中一方写代码的时候另一方编译器中能够实时同步对方的代码

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.