epii-server 具有以下特性: 介绍
epii-server是基于koa的node应用框架,服务与构建渲染工具分离,提供更纯粹的MVC开发体验。
具有以下特性:
MVC 管道
(Request) => Middleware => Controller => View => (Response)
**ASP.net-liked**
不同的ActionResult会产生不同的响应
// controller module.exports = [ { path: '/', verb: 'get', body: async function () { // response text/plain return this.epii.text('text output') // response application/json return this.epii.json({ state: true }) // response text/html by VieWrender return this.epii.view({ name: 'Li Lei' }) // response application/octet-stream return this.epii.file('dataset.csv') } } ]
// client/index.Meta.js module.exports = { base: 'simple', // inherit simple layout head: { styles: 'client/index.css' }, body: { holder: 'client/index.html', scripts: 'client/index.js' } } // layout/simple.Meta.js module.exports = { head: { title: 'EPII Avatar', Metas: [], styles: 'reset.css', favico: 'epii-icon.png' }, body: { scripts: 'jquery-2.2.2.min.js' } }
epii-server 具有以下特性: 官网
https://github.com/epii-io/epii-node-server
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。