Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/THUSAAC/tuoj-web
https://github.com/THUSAAC/tuoj-web
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/THUSAAC/tuoj-web
- Owner: THUSAAC
- Archived: true
- Created: 2016-11-28T07:02:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-06T13:12:38.000Z (almost 8 years ago)
- Last Synced: 2024-08-02T01:27:38.433Z (6 months ago)
- Language: JavaScript
- Size: 862 KB
- Stars: 6
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
TUOJ Web Server
===Let's make Tri-UOJ
# How to init
## Using docker
If you have docker on your local computer, you can run```
tools/startdb.sh
tools/build.sh
```separately to initialize the project.
## Manually
TUOJ web server depends on `npm`, `bower`, `grunt-cli`.By default, you should concat client files using grunt.
You should run following commands to initialize the app.
Install npm
```
sudo apt-get install nodejs npm mongodb # maybe other packman tools
```Install nrm and nrm to switch your npm source to taobao (which is faster)
```
sudo npm install -g nrm
nrm use taobao
```Install packages
```
cd ./oj
npm install
sudo npm install -g bower grunt-cli
bower install
```There is no user by default, while registeration is not allowed currently.
Therefore, you should run
```
node oj/tools/initdb.js
```to create a user with both his username and passwrod set as `root`.
You may change that script to register more users.
# How to start the app
## Docker
We have a `docker-compose` startup config file. You may run```
tools/compose.sh
```to start two docker containers.
## Manually
You need to start mongodb server manually if needed (on mac and windows for example).It is usually not needed on linux. You may run `mongo` to test if you already have had a mongodb server running.
```
mongod
```And then start the nodejs app by running
```
cd ./oj
grunt
```