Commit 2efabde2 authored by Arunoda Susiripala's avatar Arunoda Susiripala Committed by Dan Zajdband

Fix koa-404 issue by adding res.statusCode to 200 (#815)

parent c1f2b92a
......@@ -26,6 +26,13 @@ app.prepare()
this.respond = false
})
server.use(function *(next) {
// Koa doesn't seems to set the default statusCode.
// So, this middleware does that
this.res.statusCode = 200
yield next
})
server.use(router.routes())
server.listen(3000, (err) => {
if (err) throw err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment