node-muneem / anumargak

Simple but Fastest Web Router in nodejs
Other
39 stars 5 forks source link

Register multiple URLs to the same handler #10

Closed amitguptagwl closed 6 years ago

amitguptagwl commented 6 years ago

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
})
ghost commented 6 years ago

I will have a look.