Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
quantum-blocks
Commits
903f87b3
Commit
903f87b3
authored
May 26, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 调试apollo
parent
35554749
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
36 deletions
+32
-36
.gitignore
.gitignore
+0
-1
server.js
bin/server.js
+1
-0
apollo.json
config/apollo.json
+22
-22
config.prod.ts
config/config.prod.ts
+1
-5
config.sit.ts
config/config.sit.ts
+7
-7
package.json
package.json
+1
-1
No files found.
.gitignore
View file @
903f87b3
...
@@ -17,7 +17,6 @@ app/**/*.js
...
@@ -17,7 +17,6 @@ app/**/*.js
config/plugin.local.js
config/plugin.local.js
config/plugin.js
config/plugin.js
config/config.*.js
config/config.*.js
config/apollo.json
index.js
index.js
config/manifest.json
config/manifest.json
app/view/*
app/view/*
...
...
bin/server.js
View file @
903f87b3
...
@@ -9,6 +9,7 @@ npm.load(() => {
...
@@ -9,6 +9,7 @@ npm.load(() => {
appId
:
'
quantum-blocks
'
,
appId
:
'
quantum-blocks
'
,
configPath
:
path
.
resolve
(
__dirname
,
'
../config
'
),
configPath
:
path
.
resolve
(
__dirname
,
'
../config
'
),
}).
then
(()
=>
{
}).
then
(()
=>
{
console
.
log
(
"
>>> apollo file
"
,
require
(
path
.
resolve
(
'
./config/apollo.json
'
)));
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
npm
.
run
(
"
start
"
);
npm
.
run
(
"
start
"
);
}
else
{
}
else
{
...
...
config/apollo.json
View file @
903f87b3
{
{
"api"
:{
"api"
:
{
"apiHost"
:
"https://quantum-blocks-vcc2
.liangkebang.net/"
,
"apiHost"
:
"https://quantum-blocks-undefined
.liangkebang.net/"
,
"h5Host"
:
"https://quantum-h5-vcc2
.liangkebang.net/"
,
"h5Host"
:
"https://quantum-h5-undefined
.liangkebang.net/"
,
"opapiHost"
:
"https://opapi-vcc2
.liangkebang.net/"
,
"opapiHost"
:
"https://opapi-undefined
.liangkebang.net/"
,
"passportHost"
:
"https://passportapi-vcc2
.liangkebang.net"
,
"passportHost"
:
"https://passportapi-undefined
.liangkebang.net"
,
"kdspHost"
:
"https://talos-vcc2
.liangkebang.net"
"kdspHost"
:
"https://talos-undefined
.liangkebang.net"
},
},
"mysql"
:{
"mysql"
:
{
"low_code"
:
{
"low_code"
:
{
"host"
:
"${DB_SERVICE_HOST}
"
,
"host"
:
"undefined
"
,
"port"
:
"${DB_SERVICE_PORT}
"
,
"port"
:
"undefined
"
,
"username"
:
"qa"
,
"username"
:
"qa"
,
"password"
:
"qatest"
,
"password"
:
"qatest"
,
"database"
:
"low_code"
"database"
:
"low_code"
}
}
},
},
"redis"
:{
"redis"
:
{
"port"
:
"${REDIS_SERVICE_PORT}
"
,
"port"
:
"undefined
"
,
"host"
:
"${REDIS_SERVICE_HOST}
"
,
"host"
:
"undefined
"
,
"password"
:
""
,
"password"
:
""
,
"db"
:
0
"db"
:
0
},
},
"qiniu"
:{
"qiniu"
:
{
"qiniuUpHost"
:
"https://up-z0.qiniup.com"
,
"qiniuUpHost"
:
"https://up-z0.qiniup.com"
,
"qiniuHost"
:
"https://appsync.lkbang.net"
"qiniuHost"
:
"https://appsync.lkbang.net"
}
}
}
}
\ No newline at end of file
config/config.prod.ts
View file @
903f87b3
...
@@ -14,8 +14,6 @@ export default (appInfo: EggAppConfig) => {
...
@@ -14,8 +14,6 @@ export default (appInfo: EggAppConfig) => {
};
};
console
.
log
(
'
env>>
'
,
process
.
env
.
NAMESPACE
,
process
.
env
.
NODE_ENV
,
process
.
env
.
EGG_SERVER_ENV
);
exports
.
sequelize
=
{
exports
.
sequelize
=
{
dialect
:
'
mysql
'
,
dialect
:
'
mysql
'
,
username
:
'
low_code_w
'
,
username
:
'
low_code_w
'
,
...
@@ -25,7 +23,7 @@ export default (appInfo: EggAppConfig) => {
...
@@ -25,7 +23,7 @@ export default (appInfo: EggAppConfig) => {
database
:
'
low_code
'
,
database
:
'
low_code
'
,
};
};
const
prodRedisConfig
=
{
exports
.
redis
=
{
default
:
{
default
:
{
keyPrefix
:
appInfo
.
name
+
'
:
'
,
keyPrefix
:
appInfo
.
name
+
'
:
'
,
},
},
...
@@ -37,7 +35,5 @@ export default (appInfo: EggAppConfig) => {
...
@@ -37,7 +35,5 @@ export default (appInfo: EggAppConfig) => {
}
}
};
};
exports
.
redis
=
prodRedisConfig
;
return
exports
;
return
exports
;
};
};
config/config.sit.ts
View file @
903f87b3
const
path
=
require
(
'
path
'
);
import
{
Application
,
EggAppConfig
}
from
'
egg
'
;
import
{
Application
,
EggAppConfig
}
from
'
egg
'
;
import
apollo
from
'
./apollo.json
'
;
const
{
mysql
,
redis
}
=
apollo
;
export
default
(
appInfo
:
EggAppConfig
)
=>
{
export
default
(
appInfo
:
EggAppConfig
)
=>
{
const
{
mysql
,
redis
}
=
require
(
path
.
resolve
(
'
./config/apollo.json
'
));
const
exports
:
any
=
{};
const
exports
:
any
=
{};
console
.
log
(
'
>>>env:
'
,
process
.
env
.
NAMESPACE
,
process
.
env
.
NODE_ENV
,
process
.
env
.
EGG_SERVER_ENV
);
exports
.
logger
=
{
const
localMysqlConfig
=
{
dir
:
'
/home/quant_group/logs
'
,
};
exports
.
sequelize
=
{
dialect
:
'
mysql
'
,
dialect
:
'
mysql
'
,
...
mysql
.
low_code
...
mysql
.
low_code
};
};
exports
.
sequelize
=
localMysqlConfig
;
exports
.
redis
=
{
exports
.
redis
=
{
default
:
{
default
:
{
keyPrefix
:
appInfo
.
name
+
'
:
'
,
keyPrefix
:
appInfo
.
name
+
'
:
'
,
...
...
package.json
View file @
903f87b3
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"description"
:
"低代码平台"
,
"description"
:
"低代码平台"
,
"scripts"
:
{
"scripts"
:
{
"start"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3C egg-scripts start --port 9050 --workers 1"
,
"start"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3C egg-scripts start --port 9050 --workers 1"
,
"test"
:
"cross-env NODE_ENV=production EGG_SERVER_ENV=sit DEBUG=apollo
NODE_ENV=qa
APOLLO_CLUSTER=k8s NAMESPACE=qa2 egg-scripts start --port 80 --workers 1"
,
"test"
:
"cross-env NODE_ENV=production EGG_SERVER_ENV=sit DEBUG=apollo APOLLO_CLUSTER=k8s NAMESPACE=qa2 egg-scripts start --port 80 --workers 1"
,
"stop"
:
"egg-scripts stop"
,
"stop"
:
"egg-scripts stop"
,
"backend"
:
"nohup egg-scripts start --port 7001 --workers 4"
,
"backend"
:
"nohup egg-scripts start --port 7001 --workers 4"
,
"dev"
:
"egg-bin dev -r egg-ts-helper/register"
,
"dev"
:
"egg-bin dev -r egg-ts-helper/register"
,
...
...
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