工程:提取运行环境字符串
This commit is contained in:
@@ -38,6 +38,7 @@ filePath.CONFIG_DIR = '/config';
|
||||
const adminfilePath = _pinus.DEFAULT_ADMIN_PATH;
|
||||
adminfilePath.ADMIN_FILENAME = 'adminUser';
|
||||
adminfilePath.ADMIN_USER = 'config/adminUser';
|
||||
const ALL_ENVS = 'production|development|alpha|dev|isbn';
|
||||
/**
|
||||
* 替换全局Promise
|
||||
* 自动解析sourcemap
|
||||
@@ -81,7 +82,7 @@ app.configure(function() {
|
||||
});
|
||||
|
||||
// app configuration
|
||||
app.configure('production|development|alpha|dev|isbn', 'connector', function () {
|
||||
app.configure(ALL_ENVS, 'connector', function () {
|
||||
app.set('connectorConfig',
|
||||
{
|
||||
connector: pinus.connectors.hybridconnector,
|
||||
@@ -106,7 +107,7 @@ app.configure('production|development|alpha|dev|isbn', 'connector', function ()
|
||||
});
|
||||
});
|
||||
|
||||
app.configure('production|development|alpha|dev|isbn', 'gate', function () {
|
||||
app.configure(ALL_ENVS, 'gate', function () {
|
||||
app.set('connectorConfig',
|
||||
{
|
||||
connector: pinus.connectors.hybridconnector,
|
||||
@@ -114,7 +115,7 @@ app.configure('production|development|alpha|dev|isbn', 'gate', function () {
|
||||
});
|
||||
});
|
||||
|
||||
app.configure('production|development|alpha|dev|isbn', 'gm', function () {
|
||||
app.configure(ALL_ENVS, 'gm', function () {
|
||||
app.set('connectorConfig',
|
||||
{
|
||||
connector: pinus.connectors.hybridconnector,
|
||||
@@ -123,7 +124,7 @@ app.configure('production|development|alpha|dev|isbn', 'gm', function () {
|
||||
init();//将gm后台数据加载到gate服
|
||||
});
|
||||
|
||||
app.configure('production|development|alpha|dev|isbn', 'guild', function () {
|
||||
app.configure(ALL_ENVS, 'guild', function () {
|
||||
app.set('connectorConfig',
|
||||
{
|
||||
connector: pinus.connectors.hybridconnector,
|
||||
@@ -131,7 +132,7 @@ app.configure('production|development|alpha|dev|isbn', 'guild', function () {
|
||||
});
|
||||
});
|
||||
|
||||
app.configure('production|development|alpha|dev|isbn', 'systimer', function () {
|
||||
app.configure(ALL_ENVS, 'systimer', function () {
|
||||
app.set('connectorConfig',
|
||||
{
|
||||
connector: pinus.connectors.hybridconnector,
|
||||
@@ -165,7 +166,7 @@ export function globalErrorHandler(err: Error, msg: any, resp: any,
|
||||
}
|
||||
|
||||
// app configure
|
||||
app.configure('production|development|alpha|dev|isbn', function () {
|
||||
app.configure(ALL_ENVS, function () {
|
||||
app.set(RESERVED.ERROR_HANDLER, errorHandler);
|
||||
app.set(RESERVED.GLOBAL_ERROR_HANDLER, globalErrorHandler);
|
||||
app.globalAfter((err: Error, routeRecord: RouteRecord, msg: any, session: FrontendOrBackendSession, resp: any, cb: HandlerCallback) => {
|
||||
|
||||
Reference in New Issue
Block a user