在Ember.JS中,如何安全地加载敏感环境数据?
在在Ember.JS中,如何安全地加载敏感环境数据?,ember.js,Ember.js,在/config/environment.js中: /* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'bumbox', podModulePrefix: 'bumbox/pods', environment: environment, baseURL: '/', locationType: 'auto', Em
/config/environment.js
中:
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'bumbox',
podModulePrefix: 'bumbox/pods',
environment: environment,
baseURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
}
},
APP: {
// Here you can pass flags/options to your application instance
// when it is created
}
};
if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
// ENV.APP.LOG_VIEW_LOOKUPS = true;
}
if (environment === 'test') {
// Testem prefers this...
ENV.baseURL = '/';
ENV.locationType = 'none';
// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;
ENV.APP.rootElement = '#ember-testing';
}
ENV['ember-simple-auth'] = {
authenticationRoute: 'index',
routeAfterAuthentication: 'protected',
routeIfAlreadyAuthenticated: 'protected'
};
return ENV;
};
我有一些属性需要添加到ENV
对象中,但我宁愿将这些属性存储在一个单独的.gitignore
'd文件中,所以我不会将它们发布到github。类似于/config/protected.js
项目就是您想要的
即使是关于如何设置和使用ember cli dotenv
ember的视频,也会播放关于使用ember cli dotenv的视频
即使是关于如何设置和使用ember cli dotenv
ember屏幕也会播放关于使用ember cli dotenv的视频