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
d4f2e317
Commit
d4f2e317
authored
Dec 04, 2019
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
932fb7e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
jiaxiya/app/config/settings.js
+23
-18
No files found.
jiaxiya/app/config/settings.js
View file @
d4f2e317
var
path
=
require
(
'path'
);
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
,
REDIS_HOST
:
process
.
env
.
REDIS_HOST
,
REDIS_PORT
:
process
.
env
.
REDIS_PORT
,
REDIS_PWD
:
process
.
env
.
REDIS_PWD
,
REDIS_DB
:
process
.
env
.
JIAXIYA_REDIS_DB
,
DB_NAME
:
process
.
env
.
JIAXIYA_DB_NAME
,
APP_ENV
:
process
.
env
.
APP_ENV
?
process
.
env
.
APP_ENV
:
"dev"
};
var
settings
=
{
var
settings
=
{
env
:
"dev"
,
env
:
ENVINPUT
.
APP_ENV
,
appKey
:
"d47f72a7228243a3bad03541d2a2c22c"
,
appKey
:
"d47f72a7228243a3bad03541d2a2c22c"
,
paasKey
:
"wx76a324c5d201d1a4"
,
paasKey
:
"wx76a324c5d201d1a4"
,
secret
:
"047c51d2f0974802a17dde560d2871cb"
,
secret
:
"047c51d2f0974802a17dde560d2871cb"
,
...
@@ -17,14 +29,6 @@ var settings = {
...
@@ -17,14 +29,6 @@ var settings = {
return
"https://open.gongsibao.com/"
;
return
"https://open.gongsibao.com/"
;
}
}
},
},
channelApiUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.18.61:4003"
;
}
else
{
return
"http://zc-channel-service"
;
}
},
reqEsAddr
:
function
(){
reqEsAddr
:
function
(){
if
(
this
.
env
==
"dev"
){
if
(
this
.
env
==
"dev"
){
var
localsettings
=
require
(
"./localsettings"
);
var
localsettings
=
require
(
"./localsettings"
);
...
@@ -47,10 +51,10 @@ var settings = {
...
@@ -47,10 +51,10 @@ var settings = {
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
,
};
};
}
}
},
},
...
@@ -60,11 +64,11 @@ var settings = {
...
@@ -60,11 +64,11 @@ var settings = {
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
:
{
...
@@ -81,6 +85,7 @@ var settings = {
...
@@ -81,6 +85,7 @@ var settings = {
},
},
};
};
}
}
}
,
}
};
};
settings
.
ENVINPUT
=
ENVINPUT
;
module
.
exports
=
settings
;
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