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

Register multiple URLs to the same handler #10

Open
amitguptagwl opened this Issue Oct 6, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@amitguptagwl
Member

amitguptagwl commented Oct 6, 2018

As per the current implementation, we can map only one URL to one handler.

router.on('GET', '/', (req, res, params) => {
  //process the request response here
})

We want to support and an array of URL in the above method. So that multiple URLs can be registered at a time.

router.on('GET', ['/404.html', '/503.html', 'anyerror.html' ], (req, res, params) => {
  //process the request response here
})
@veraschngr

This comment has been minimized.

Show comment
Hide comment
@veraschngr

veraschngr Oct 6, 2018

I will have a look.

veraschngr commented Oct 6, 2018

I will have a look.

@veraschngr veraschngr referenced a pull request that will close this issue Oct 6, 2018

Open

Updated 'on()' to allow multiple urls per handle #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment