Closed batrudinych closed 5 years ago
This looks correct to me.
@chovy does this work as expected on your machine? With certain versions in use
Are you just missing a /
at the start of the prefix?
5c5
< const ordersRouter = new Router({ prefix: 'orders' })
---
> const ordersRouter = new Router({ prefix: '/orders' })
Thanks @bytesnz Awkward situation :) My bad
No problem. Glad that was it. Been there, done that. :smile:
node.js version: 10.15.1 npm version: 6.4.1
koa-router
version: 7.4.0koa
version: 2.7.0Code sample:
Expected Behavior:
localhost:3000/orders
responds withOrders
stringActual Behavior:
localhost:3000/orders
responds with 404 Not Found