UNPKG

epi

Version:

A Api Service Framework Base On Express.js

53 lines (47 loc) 1.33 kB
/** * @author * @time 15/9/2 * @desc 开发环境的配置文件 */ var fs = require('fs'); var path = require('path'); module.exports = function(projectPath){ return { /** * 服务器的配置 * server.port.http http监听端口,如果不提供则不监听 * server.port.https https监听端口,如果不提供则不监听,如果两个都提供,两个都监听 * server.host 绑定的host * server.proxy 信任的代理 * server.key 使用https的时候提供的秘钥 * server.cert 使用https的时候提供的公钥 * */ server: { port: { http : 8000, https: 4433 }, host: null, proxy: { trust: true, ips: [] }, key : fs.readFileSync(path.join(projectPath, 'resource/key.pem')), cert : fs.readFileSync(path.join(projectPath, 'resource/cert.pem')) }, /** * 日志配置 * */ logger: { type: 'console', behavior: 'append', filename: function () { return 'logs.log'; }, path: '', size: { max: '' } } }; };