Koa2 middleware or routing problems

using koa2"s middleware, I want to implement an interceptor in order to perform some processing on all requests. The code is as follows:

when visiting /, the middleware is executed and / and 1111 are printed at the terminal, but the page shows that it is no problem for not found, to remove the middleware.

I don"t know why, ask the great god for an answer.


did not return ctx.body

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be6efe-31823.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be6efe-31823.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?