基于 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://codercto.com/soft/d/3535.html

精通Android游戏开发

精通Android游戏开发

[美] Vladimir Silva / 王恒、苏金国 等 / 人民邮电出版社 / 2011-2 / 45.00元

作为引领移动技术潮流的软件平台,Android发布了NDK以支持Java和C的混合开发,使PC游戏可以在Android平台上焕发更多魅力。 本书是为那些在Android游戏开发工作中寻求突破的人准备的。书中不仅通过Space Blaster和Asteroids这两个炫酷 的街机游戏深入介绍了如何从头构建纯Java游戏,更详细展示了如何将PC上的3D经典游戏Doom和Wolfenstein 3......一起来看看 《精通Android游戏开发》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

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

HSV CMYK互换工具