-
-
全面接入ES6,promise对象和generator函数
只是一个建议,哈哈
-
Topic: Koa - Asynchronous Decorators as Middleware
Job Title: Independent Developer
Github: @jonathanong
Email: jongleberry@gmail.com
[Koa](https://github.com/koajs/koa) is the spiritual successor to…
-
-
-
It took me a couple hours this morning to figure this all out, so I'd like to document it here, and with some guidance from the maintainer I am willing to provide a PR for either the documentation or …
-
Hi,
Is koa-cors supposed to work with koa-static? https://www.npmjs.com/package/koa-static
-
# node koa 代理服务 get post 请求 发布
## 环境
- node v9.8.0
- koa ^2.5.0
## 说明
开发微信小程序调用后端接口,因为公司后端服务器使用ip,并且还是http的,所以使用自己服务器和域名做了下api 转发进行小程序的请求测试。
## 问题
### 跨域请求
```
yarn add koa-cors //安装
a…
-
-
koa 框架一直都保持着简洁性, 它只对 node 的 HTTP 模块进行了封装, 而在真正实际使用, 我们还需要更多地像路由这样的模块来构建我们的应用, 而 koa-router 是常用的 koa 的路由库. 这里通过解析 koa-router 的源码来达到深入学习的目的.
## 深入浅出路由模块
在 node 原生里面, 如果我们需要实现路由功能, 那么就可以像下面这样编写代码:
`…