基于 koa 的 node 应用框架 epii-server

码农软件 · 软件分类 · Node.js 扩展 · 2019-04-14 06:42:09

软件介绍

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'
  }
}

本文地址:https://www.codercto.com/soft/d/3535.html

超预期

超预期

[美] 莱昂纳多·因基莱里、迈卡·所罗门 / 杨波 / 后浪丨江西人民出版社 / 2017-11 / 45.00元

用户体验决定产品成败,只有超预期才能赢得好口碑! 互联网大佬一致推崇的打造爆款产品及服务的核心理念 ................... ※编辑推荐※ ☆ 超预期,才有用户体验,互联网大佬一致推崇的打造爆款产品及服务的核心理念 - 周鸿祎:“什么叫用户体验?超过用户预期才叫 体验!” - 雷军:“口碑的真谛是超越用户的期望值。” - 马化腾:“用户体验,......一起来看看 《超预期》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具