search

Home  >  Q&A  >  body text

node.js - koa响应报错

第一次用koa,各种混乱。。。

在数据库插入回调中响应,却报错了,这个是怎么回事呀,怎么会已经有了响应呢?

怪我咯怪我咯2781 days ago563

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-17 11:55:57

    This error means that the data has been returned, but there is still an attempt to continue writing.
    It is recommended to familiarize yourself with the generator before playing koa. This article is good, you can read it
    http://blog.stevensanderson.com/2013/12/21/experiments-with-koa-and-ja...

    reply
    0
  • 阿神

    阿神2017-04-17 11:55:57

    javascriptvar data = yield promise;
    

    reply
    0
  • Cancelreply