Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
f8974924
Commit
f8974924
authored
Nov 12, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
5a70fd60
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
33 deletions
+144
-33
laowubao/app/config/settings.js
+33
-33
settings.js
+111
-0
No files found.
laowubao/app/config/settings.js
View file @
f8974924
...
@@ -261,45 +261,45 @@ var settings = {
...
@@ -261,45 +261,45 @@ var settings = {
return
"mongodb://wdy1:123456@43.247.184.94:27017/"
;
return
"mongodb://wdy1:123456@43.247.184.94:27017/"
;
}
}
},
},
redis
:
function
()
{
redis
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
var
localsettings
=
require
(
"./localsettings"
);
var
localsettings
=
require
(
"./localsettings"
);
return
localsettings
.
redis
;
return
localsettings
.
redis
;
}
else
{
}
else
{
return
{
return
{
host
:
"xxxxx"
,
host
:
ENVINPUT
.
REDIS_HOST
,
port
:
xxxxx
,
port
:
ENVINPUT
.
REDIS_PORT
,
password
:
"xxxxx"
,
password
:
ENVINPUT
.
REDIS_PWD
,
db
:
xx
,
db
:
ENVINPUT
.
REDIS_DB
,
};
};
}
}
},
},
database
:
function
()
{
database
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
var
localsettings
=
require
(
"./localsettings"
);
var
localsettings
=
require
(
"./localsettings"
);
return
localsettings
.
database
;
return
localsettings
.
database
;
}
else
{
}
else
{
return
{
return
{
dbname
:
"xxxxx"
,
dbname
:
ENVINPUT
.
DB_NAME
,
user
:
"xxxx"
,
user
:
ENVINPUT
.
DB_USER
,
password
:
"xxxxx"
,
password
:
ENVINPUT
.
DB_PWD
,
config
:
{
config
:
{
host
:
'xxxxxx'
,
host
:
ENVINPUT
.
DB_HOST
,
dialect
:
'mysql'
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
operatorsAliases
:
false
,
pool
:
{
pool
:
{
max
:
5
,
max
:
5
,
min
:
0
,
min
:
0
,
acquire
:
90000000
,
acquire
:
90000000
,
idle
:
1000000
idle
:
1000000
},
},
debug
:
false
,
debug
:
false
,
dialectOptions
:
{
dialectOptions
:
{
requestTimeout
:
999999
,
requestTimeout
:
999999
,
// instanceName:'DEV'
// instanceName:'DEV'
}
//设置MSSQL超时时间
}
//设置MSSQL超时时间
},
},
};
};
}
}
},
},
databasehb
:
function
()
{
databasehb
:
function
()
{
...
...
settings.js
0 → 100644
View file @
f8974924
var
path
=
require
(
'path'
);
var
ENVINPUT
=
{
DB_HOST
:
process
.
env
.
DB_HOST
,
DB_PORT
:
process
.
env
.
DB_PORT
,
DB_USER
:
process
.
env
.
DB_USER
,
DB_PWD
:
process
.
env
.
DB_PWD
,
DB_NAME
:
process
.
env
.
PAAS_DB_NAME
,
REDIS_HOST
:
process
.
env
.
REDIS_HOST
,
REDIS_PORT
:
process
.
env
.
REDIS_PORT
,
REDIS_PWD
:
process
.
env
.
REDIS_PWD
,
REDIS_DB
:
process
.
env
.
PAAS_REDIS_DB
,
APP_ENV
:
process
.
env
.
APP_ENV
?
process
.
env
.
APP_ENV
:
"dev"
};
var
settings
=
{
env
:
ENVINPUT
.
APP_ENV
,
platformid
:
1
,
platformcompanyid
:
1
,
commonroleid
:
1
,
passroleid
:
2
,
tanentroleid
:
1
,
protocalPrefix
:
"http://"
,
appKey
:
"wx76a324c5d201d1a4"
,
secret
:
"f99d413b767f09b5dff0b3610366cc46"
,
salt
:
"%iatpD1gcxz7iF#B"
,
defaultpwd
:
"987456"
,
basepath
:
path
.
normalize
(
path
.
join
(
__dirname
,
'../..'
)),
port
:
process
.
env
.
NODE_PORT
||
4001
,
reqEsAddr
:
function
(){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
return
"http://43.247.184.94:7200/"
;
//localsettings.reqEsDevUrl;
}
else
{
return
"http://43.247.184.94:7200/"
;
}
},
apiconfig
:{
opLogUrl
:
function
(){
return
settings
.
reqEsAddr
()
+
"bigdata_zc_op_log/_doc?pretty"
;
},
opLogEsIsAdd
:
function
(){
return
1
;
},
},
homePage
:
function
(){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
return
localsettings
.
reqHomePageDevUrl
;
}
else
{
return
"http://open.gongsibao.com/"
;
}
},
authUrl
:
function
(){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
return
localsettings
.
reqAuthUrl
;
}
else
{
return
"http://open.gongsibao.com/auth"
;
}
},
docUrl
:
function
(){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
return
localsettings
.
docUrl
;
}
else
{
return
"http://open.gongsibao.com/web/common/metaCtl/getApiDoc"
;
}
},
redis
:
function
(){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
return
localsettings
.
redis
;
}
else
{
return
{
host
:
ENVINPUT
.
REDIS_HOST
,
port
:
ENVINPUT
.
REDIS_PORT
,
password
:
ENVINPUT
.
REDIS_PWD
,
db
:
ENVINPUT
.
REDIS_DB
,
};
}
},
database
:
function
(){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
return
localsettings
.
database
;
}
else
{
return
{
dbname
:
ENVINPUT
.
DB_NAME
,
user
:
ENVINPUT
.
DB_USER
,
password
:
ENVINPUT
.
DB_PWD
,
config
:
{
host
:
ENVINPUT
.
DB_HOST
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
pool
:
{
max
:
5
,
min
:
0
,
acquire
:
90000000
,
idle
:
1000000
},
debug
:
false
,
dialectOptions
:{
requestTimeout
:
999999
,
// instanceName:'DEV'
}
//设置MSSQL超时时间
},
};
}
}
};
settings
.
ENVINPUT
=
ENVINPUT
;
module
.
exports
=
settings
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment