-
Suppose a route takes 60 seconds to respond. Client disconnects for some reason at second 25. Will Koa continue running middles or it will terminate context?
I ask this to know how to handle some slo…
siakc updated
3 weeks ago
-
近期在工作中用到了cors,所以写下这篇分享,本文基于[`koa-cors 1.0.1`](https://github.com/koajs/cors)。
### 啥是cors呢
Cross-Origin Resource Sharing(cors),顾名思义,跨域资源共享,也就是一种实现跨域的手段,想要的解决的问题是跟使用jsonp一样的。要想知道跨域是为了什么,得先知道什么是跨域。跨域(cr…
-
用户访问我们的网站,得到的结果有两种,想看的和不想看的。
不想看的分两种,网站报错和地址输错。
想看的也分两种,动态生成和静态存在。今天,我们就来聊聊静态文件。
### 所谓静态文件
所谓的静态文件,就是静态的,static的文件,无需经过查找数据库、模板渲染等步骤(以上步骤为充分不必要)就可以直接给用户看的,如js、css文件,图片等。
一般来说,访问静态文件的url和其本身的文件路径是…
-
https://github.com/nodejs-study/node-koa
-
-
app.use(require('lasso/middleware/koa').serveStatic({));
Result is : "Cannot find module 'lasso/middleware/koa'" because in this path there isn't index.js
app.use(require('lasso/middleware/koa/ser…
-
https://github.com/koajs/koa
I peeked in the middleware.js file and see that it's been made to comply with express. I tweaked my own version and is working. Just want you to know this!
working for k…
-
Would be nice if there was an example using Koa. The middleware for koa-swagger seems to be using the older version.
-
I will create a Koa 2.0 compatible branch next weeks...
**Edit:** will take additional weeks of time :cry:
Any suggestions which features I should release with that new release ?
https://github.com…
-
https://github.com/koajs/koa/blob/master/docs/migration.md