Skip to content

Commit

Permalink
add HQ server
Browse files Browse the repository at this point in the history
  • Loading branch information
PRWrl committed Sep 27, 2018
1 parent d03f460 commit 8e20b0b
Show file tree
Hide file tree
Showing 27 changed files with 3,220 additions and 0 deletions.
7 changes: 7 additions & 0 deletions HQ-Server-Nodejs/.gitignore
@@ -0,0 +1,7 @@
node_modules
.DS_Store
log
config_cn.js
config_en.js
Encrypt.js
test/
20 changes: 20 additions & 0 deletions HQ-Server-Nodejs/.vscode/launch.json
@@ -0,0 +1,20 @@
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/server.js"
},
{
"type": "node",
"request": "launch",
"name": "Launch Test",
"program": "${workspaceFolder}/test/test.js"
}
]
}
14 changes: 14 additions & 0 deletions HQ-Server-Nodejs/deploy_cn.sh
@@ -0,0 +1,14 @@
#!/bin/sh
#copy client static files

deployDir=/home/devops/web_demo/project/HQ-PHASE-3
ServerName=${@:$OPTIND:1}

# Rev="$(git rev-parse HEAD)"

# echo $Rev
# cd dist
cp modules/config_cn.js modules/config.js
rsync -v -z -r --progress -h --exclude=node_modules/* --exclude=.* --exclude=deploy_test.sh . $ServerName:$deployDir

echo service deployed on:$ServerName:$deployDir
14 changes: 14 additions & 0 deletions HQ-Server-Nodejs/deploy_en.sh
@@ -0,0 +1,14 @@
#!/bin/sh
#copy client static files

deployDir=/home/test-pc/HQ-PHASE-3
ServerName=${@:$OPTIND:1}

# Rev="$(git rev-parse HEAD)"

# echo $Rev
# cd dist
cp modules/config_en.js modules/config.js
rsync -v -z -r --progress -h --exclude=node_modules/* --exclude=.* --exclude=deploy_test.sh . $ServerName:$deployDir

echo service deployed on:$ServerName:$deployDir
18 changes: 18 additions & 0 deletions HQ-Server-Nodejs/ecosystem.config.js
@@ -0,0 +1,18 @@
module.exports = {
/**
* Application configuration section
* http://pm2.keymetrics.io/docs/usage/application-declaration/
*/
apps : [

// First application
{
name : 'HQ-3',
script : 'server.js',
env: {
COMMON_VARIABLE: 'true',
NODE_ENV: 'production'
}
}
]
};

0 comments on commit 8e20b0b

Please sign in to comment.