Giter Site home page Giter Site logo

hustoj-neo's Introduction

HUST Online Judge Neo Version

HUST Online Judge is a web application.

This application still under construction, if you like improve it, please contact freefcw at qq.com.

StyleCI Scrutinizer Code Quality Build Status Code Coverage Code Intelligence Status

ALERT

This version is not compatible with old version! The Judged is not upgrade!

Install Tutorial

  1. Clone this repository

  2. Install vendor package via composer

    cd hustoj-neo
    composer install --no-dev

    if you want have some develop, you can run composer install to install dev packages

  3. config you application.

    php artisan key:generate # generate private key
    copy .env.example .env
  4. database

    1. config you database in .env

      # new database
      DB_CONNECTION=mysql
      DB_PORT=3306
      DB_HOST=127.0.0.1
      DB_DATABASE=neo
      DB_USERNAME=root
      DB_PASSWORD=root
      
    2. create new database structure

      php artisan migrate
      
    3. if you fresh to hustoj, can skip this step.

      migrate from old version hustoj, you can add old database configure:

      # old database
      OLD_DB_PORT=3306
      OLD_DB_HOST=127.0.0.1
      OLD_DB_DATABASE=judge
      OLD_DB_USERNAME=root
      OLD_DB_PASSWORD=root

      If you migrate from the initial version hustoj, you need migrate exist database structure follow this wiki, migrate database data via command:

      php artisan database:migrate
  5. Git code come with packed frontweb, if you don't need develop, can skip this step. build front web

     ```bash
     npm install
     npm run prod # build front web
     npm run admin-prod # build admin front web
     ```
    
  6. setup other configure

     1. APP_NAME is your project name, will show on browser title and head brand.
     2. APP_DEBUG is debug switch
     3. APP_URL is your website url
     4. RABBITMQ_* is rabbitmq host, used to maintain solution queue to judger server. detail can see config/rabbitmq.php
     5. MAIL_* is config to setup email notify, detail can visit config/mail.php
     6. other relate config can visit config/hustoj.php
     7. Relate Project:
     	1. [judger](https://github.com/hustoj/judger) is judger for handle solution compile and runner.
     	2. [runner](https://github.com/hustoj/runner) is executor for compile solution source and execute program.
    
  7. register a user from web, make you account has administrator privilege.

     ```bash
     php artisan assign:admin
     ```
    
  8. use you administrator account login front web, you will see admin link in your top right.

Contributing

Thank you for considering contributing to the HUST Online Judge! You can add issue or make pull request!

Security Vulnerabilities

If you discover a security vulnerability within HUST Online Judge, please send an e-mail to freefcw at qq.com. All security vulnerabilities will be promptly addressed.

License

The HUST Online Judge Neo Version Under MIT license.

Thanks

hustoj-neo's People

Contributors

deepsource-autofix[bot] avatar deepsourcebot avatar dependabot[bot] avatar freefcw avatar sempr avatar stylecibot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hustoj-neo's Issues

npm run prod failed

cat /root/.npm/_logs/2019-07-13T09_39_03_560Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle @~predev: @
6 info lifecycle @~dev: @
7 verbose lifecycle @~dev: unsafe-perm in lifecycle true
8 verbose lifecycle @~dev: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/w/onlinejudge/hustoj-neo/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
9 verbose lifecycle @~dev: CWD: /w/onlinejudge/hustoj-neo
10 silly lifecycle @~dev: Args: [ '-c', 'npm run development' ]
11 silly lifecycle @~dev: Returned: code: 1 signal: null
12 info lifecycle @~dev: Failed to exec dev script
13 verbose stack Error: @ dev: npm run development
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:203:13)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:203:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid @
15 verbose cwd /w/onlinejudge/hustoj-neo
16 verbose Linux 3.10.0-957.21.3.el7.x86_64
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
18 verbose node v12.6.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error @ dev: npm run development
22 error Exit status 1
23 error Failed at the @ dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

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.