We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1f2b92 commit 2efabdeCopy full SHA for 2efabde
examples/custom-server-koa/server.js
@@ -26,6 +26,13 @@ app.prepare()
26
this.respond = false
27
})
28
29
+ server.use(function *(next) {
30
+ // Koa doesn't seems to set the default statusCode.
31
+ // So, this middleware does that
32
+ this.res.statusCode = 200
33
+ yield next
34
+ })
35
+
36
server.use(router.routes())
37
server.listen(3000, (err) => {
38
if (err) throw err
0 commit comments