@coofy/koafy

1.1.2 • Public • Published

基于koa2的koafy框架

一、Decorator控制Koa路由

  • spring
@Controller
public class HelloController{
    @RequestMapping("/hello")
    String hello() {
        return "Hello World";  
    }
}

  • falsk
@app.route("/hello")
def hello():
    return "Hello World"
  • but Express或Koa上的路由
router.get('/hello', async ctx => {
    ctx.body = 'Hello World'
})
  • 封装Koa路由

Readme

Keywords

none

Package Sidebar

Install

npm i @coofy/koafy

Weekly Downloads

1

Version

1.1.2

License

ISC

Unpacked Size

18.6 kB

Total Files

41

Last publish

Collaborators

  • mopacha