Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix seems to be broken #81

Closed
batrudinych opened this issue Feb 1, 2019 · 0 comments
Closed

Prefix seems to be broken #81

batrudinych opened this issue Feb 1, 2019 · 0 comments

Comments

@batrudinych
Copy link

batrudinych commented Feb 1, 2019

ubuntu 16.04
Node.js 10.15.1
koa 2.7.0
koa-joi-router 5.2.0

'use strict'

const Koa = require('koa')
const app = new Koa()

const router = require('koa-joi-router')

const orders = router()
orders.get('/', ctx => {
  ctx.body = 'Orders response'
})

orders.prefix('orders')

app.use(orders.middleware())

app.listen(3000)

Actual behavior:

localhost:3000/orders returns 404 Not Found

Expected behavior:

localhost:3000/orders returns 200 'Orders response`

Connected issue created in koa-router

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant