1 Star 0 Fork 0

赵梓宇 / egg-proxy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
app.js 506 Bytes
一键复制 编辑 原始数据 按行查看 历史
张红涛 提交于 2018-11-20 11:51 . v0.1
'use strict';
const assert = require('assert');
module.exports = (app) => {
const index = app.config.appMiddleware.indexOf('httpproxy');
//console.log(app.config.httpproxy)
assert.equal(index, -1, 'Duplication of middleware name found: rest. Rename your middleware other than "httproxy" please.');
app.config.coreMiddleware.unshift('httpproxy');
app.beforeStart(async () => {
});
app.ready(async (err) => {
if (err) throw err;
//await app.runSchedule('update_cache');
});
};
1
https://gitee.com/zhao-ziyu/egg-proxy.git
git@gitee.com:zhao-ziyu/egg-proxy.git
zhao-ziyu
egg-proxy
egg-proxy
master

搜索帮助