本文整理汇总了TypeScript中env-read.EnvironmentConfig类的典型用法代码示例。如果您正苦于以下问题:TypeScript EnvironmentConfig类的具体用法?TypeScript EnvironmentConfig怎么用?TypeScript EnvironmentConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了EnvironmentConfig类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor(){
this.dateUtil = new DateUtil();
this.logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)({prettyPrint: true}),
new (winston.transports.File)({
filename: EnvironmentConfig.getEnvConfig().fileLocation,
prettyPrint: true
}),
new (winston.transports.DailyRotateFile)({
filename: EnvironmentConfig.getEnvConfig().fileLocation,
datePattern: EnvironmentConfig.getEnvConfig().rollingDatePattern,
prepend: true,
prettyPrint: true
})
]
});
}
示例2: require
import * as http from 'http';
import * as debug from 'debug';
import App from './app';
import path = require('path');
var cluster = require('cluster');
import { EnvironmentConfig } from 'env-read';
const port = normalizePort(EnvironmentConfig.getEnvConfig().port || 3070);
const numOfP = EnvironmentConfig.getEnvConfig().numberOfProcess || 2;
//Commenting
if(cluster.isMaster){
// Count the machine's CPUs
var cpuCount = require('os').cpus().length;
if(numOfP < cpuCount){
cpuCount = numOfP;
}
console.log('limiting only this number of processes per app::::'+cpuCount);
// Create a worker for each CPU
for (var i = 0; i < cpuCount; i += 1) {
cluster.fork();
}
cluster.on('exit', function (worker:any) {
// Replace the dead worker,
// we're not sentimental
console.log('Worker %d died :(', worker.id);
cluster.fork();
示例3:
this.router.get('/environment/ui', (req: Request, res: Response, next: NextFunction) => res.json(EnvironmentConfig.getEnvConfig().ui));
示例4:
import { EnvironmentConfig } from 'env-read'
export const ENVIRONMENT_CONFIG = {
"baseRestURL":EnvironmentConfig.getEnvConfig().baseRestUrl,
"baseEmailUrl":EnvironmentConfig.getEnvConfig().baseNRGRestEmailUrl,
"gmeBMFPasswordSetup":EnvironmentConfig.getEnvConfig().setupPasswordUrl,
"gmessHostInfo":EnvironmentConfig.getEnvConfig().gmessHostInfo,
"contentURL":EnvironmentConfig.getEnvConfig().contentUrl,
"pciLogoutUrl":EnvironmentConfig.getEnvConfig().pciLogoutUrl,
};
const DATAACCESS="/dataaccess";
export const ADD_USER_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/addusercall";
export const CHG_ADMIN_FOR_ASSOC_USER_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/chgadminforassouser";
export const DEACTIVATE_USER_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/deactivateuser";
export const DISASSOC_CUST_FROM_USER_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/disasscustfromuser";
export const GET_USERS_ASSOC_TO_BP_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/getusersassotobp";
export const GET_ASSOCIATES_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/getassociate";
export const SEARCH_BRKR_ADMIN_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/searchbrokeradmin";
export const SEARCH_CUST_ADMIN_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/searchcustomeradmin";
export const IS_USER_EXIST_FOR_SAPID_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/isusrexistforsapid";
export const UPDATE_USER_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/updateuser";
export const GET_USER_PROFILE_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/getuserprofile";
export const ASSOCIATE_USER_TO_CUST_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/associateuser2cust";
export const ADD_USER_TXN_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/addusertxn";
export const UPD_BRKR_WITH_NEW_PROP_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/updatebrkrwithnewprop";
export const GET_FIRST_LOGON_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/getfirstlogon";
export const SET_FIRST_LOGON_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/setfirstlogon";
export const GET_CUSTOMER_CONTRACT_DTLS_URL = ENVIRONMENT_CONFIG.baseRestURL+DATAACCESS+"/getcustcontractdtls";