Nuxt路由解析页面而不是api路由
Nuxt routing resolves pages instead of api route
我有一个关于 Nuxt 动态路由的小问题。我有一个 serverMiddleware(Express API on /api path with a router)和以下页面 folder/structure:
/pages
|- /_type
| |
| |- /_id.vue
| |- /index.vue
|
|- /index.vue
主要问题是/api/asdf被解析为/_type/_id。
我不想在查询中添加额外的参数(如:/type/_type/_id),我希望它尽可能短。
任何 help/advice 表示赞赏。
非常感谢。
开箱即用,但当我修改路由器时,观察器没有检测到。我不得不重新启动它。
我有一个关于 Nuxt 动态路由的小问题。我有一个 serverMiddleware(Express API on /api path with a router)和以下页面 folder/structure:
/pages
|- /_type
| |
| |- /_id.vue
| |- /index.vue
|
|- /index.vue
主要问题是/api/asdf被解析为/_type/_id。 我不想在查询中添加额外的参数(如:/type/_type/_id),我希望它尽可能短。 任何 help/advice 表示赞赏。
非常感谢。
开箱即用,但当我修改路由器时,观察器没有检测到。我不得不重新启动它。