Merge pull request #1 from brucewar/master

manage by package.json
This commit is contained in:
2016-12-13 11:22:47 +08:00
committed by GitHub
6 changed files with 65 additions and 58 deletions

21
src/web_console/README.md Normal file
View File

@@ -0,0 +1,21 @@
# dev environment
* install mysql
* init sql
refer to file `data/db/irext_private_20161204.sql`
* install redis
[Windows](https://github.com/MSOpenTech/redis/releases)
[Linux](https://redis.io/)
* `npm install`
* init log directory
```bash
npm run log
```
* start dev server
```bash
npm run dev
```
Open [http://localhost:6001](http://localhost:6001)

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# run this script before you setup the irext web console
echo "create logging directory"
mkdir -p ./logs
mkdir -p ./logs/production
mkdir -p ./logs/dev
mkdir -p ./logs/user_debug

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
filepath=$(cd "$(dirname "$0")"; pwd)
filepath=$(cd "$(dirname "$0")"/../; pwd)
cd $filepath
NODE_ENV=${1} nohup forever irext_console.js &

View File

@@ -35,7 +35,7 @@ exports.setupEnvironment = function () {
MYSQL_DB_PASSWORD = "root";
FILE_TEMP_PATH = "D:/rc_extension";
PYTHON_PATH = "C:/Python27/python.exe";
LISTEN_PORT = "80";
LISTEN_PORT = "6001";
SERVER_ADDRESS = "localhost";
REDIS_HOST = "localhost";
REDIS_PORT = "6379";

View File

@@ -1,7 +1,38 @@
{
"name": "application-name",
"name": "irext",
"version": "0.0.1",
"description": "console of irext",
"scripts": {
"dev": "supervisor -w . -i ./web irext_console.js",
"server": "bash bin/script_run.sh",
"log": "bash bin/script_init.sh"
},
"repository": {
"type": "git",
"url": "https://github.com/strawmanbobi/irext"
},
"keywords": [
"IRDA"
],
"author": "strawmanbobi",
"license": "MIT",
"dependencies": {
"orm": "latest"
"async": "^2.1.4",
"body-parser": "^1.15.2",
"express": "^4.14.0",
"form-data": "^2.1.2",
"formidable": "^1.0.17",
"log4js": "^1.0.1",
"method-override": "^2.3.7",
"mysql": "^2.12.0",
"orm": "^3.2.0",
"platform": "^1.3.3",
"python-shell": "^0.4.0",
"redis": "^2.6.3",
"request": "^2.79.0",
"ua-parser-js": "^0.7.12"
},
"devDependencies": {
"supervisor": "^0.12.0"
}
}

View File

@@ -1,54 +0,0 @@
#!/usr/bin/env bash
# run this script before you setup the irext web console
echo "running script of npm install needed by irext..."
echo "npm install express"
npm install express
echo "npm install body-parser"
npm install body-parser
echo "npm install method-override"
npm install method-override
echo "npm install platform"
npm install platform
echo "npm install ua-parser-js"
npm install ua-parser-js
echo "npm install log4js"
npm install log4js
echo "npm install formidable"
npm install formidable
echo "npm install mysql"
npm install mysql
echo "npm install redis"
npm install redis
echo "npm install orm"
npm install orm
echo "npm install python-shell"
npm install python-shell
echo "npm install request"
npm install request
echo "npm install form-data"
npm install form-data
echo "npm install async"
npm install async
echo "npm install done"
echo "create logging directory"
mkdir -p logs
mkdir -p logs/production
mkdir -p logs/dev
mkdir -p logs/user_debug