1 Star 0 Fork 0

speedphp/k.js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.js 971 Bytes
一键复制 编辑 原始数据 按行查看 历史
speedphp 提交于 2020-05-06 15:41 . fixed the unsort middleware
'use strict'
const lodash = require('lodash')
const serve = require('koa-static')
const views = require('koa-views')
const session = require('koa-session')
const bodyParser = require('koa-bodyparser')
const router = require('./lib/router.js')
const configDefault = require('./lib/config.default.js')
const model = require('./lib/model.js')
const display = require('./lib/display.js')
const rawBody = require('./lib/rawBody.js')
module.exports = (app, config, base_dir) => {
app.config = lodash.assign(configDefault(base_dir || process.cwd()), config)
app.keys = app.config.appkeys
app.use(serve(app.config.public_path))
app.use(bodyParser())
app.use(rawBody())
app.use(session(app.config.session_setting, app))
app.use(views(app.config.view_path, app.config.view_opts))
app.use(model(app.config.model_path, app.config.mysql))
app.use(display)
app.use(router(app.config.router_map, app.config.controller_path))
return app
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
NodeJS
1
https://gitee.com/SpeedPHP/k.js.git
git@gitee.com:SpeedPHP/k.js.git
SpeedPHP
k.js
k.js
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385