npm i egg-view-ejs --save
exports.ejs = {
enable: true,
package: 'egg-view-ejs',
};
module.exports = appInfo => {
const config = exports = {};
// use for cookie sign key, should change to your own and keep security
config.keys = appInfo.name + '_1532498393023_7447';
// add your config here
config.middleware = [];
//配置 ejs 模板引擎
config.view = {
mapping: {
'.html': 'ejs',
}
};
return config;
};