egg
egg copied to clipboard
[BUG] 中间件 和 egg-mongoose 一起使用 返回404
- Node Version: v8.9.4:
- Egg Version: ^2.6.1:
- Plugin Name: egg-mongoose:
- Plugin Version: ^2.2.1:
- Platform: win10:
- Mini Showcase Repository: https://github.com/djfos/egg-bug-replay-middleware-mongoose
brief
router

controller

middleware

config

plugin

问题
-
中间件 和 mongoose 一起用,返回404

-
中间件 和 mongoose 只用其中一个,返回 hi eeg

补充
- 工具 postman
- 本地数据库是空的
Translation of this issue:
[BUG] Middleware and egg-mongoose work together to return 404
- Node Version: v8.9.4:
- Egg Version: ^2.6.1:
- Plugin Name: egg-mongoose:
- Plugin Version: ^2.2.1:
- Platform: win10:
- Mini Showcase Repository: https://github.com/djfos/egg-bug-replay-middleware-mongoose
brief
router

controller

middleware

config

plugin

problem
-
Middleware is used with mongoose, returning 404

-
Middleware and mongoose use only one of them, returning hi eeg

Supplement
- Tools postman
- The local database is empty
await next() in middleware
楼上正解,我也碰到了这个问题