Closed nikhiljohn10 closed 4 years ago
i think maybe there is more here than you intend for this PR? past the third commit it seems to get v. specialized.
i think maybe there is more here than you intend for this PR? past the third commit it seems to get v. specialized.
I agree. Only first 3 commits were intended for the PR. Rest just came up when I forgot to create a feature branch. So should I close this PR?
I agree. Only first 3 commits were intended for the PR. Rest just came up when I forgot to create a feature branch. So should I close this PR?
unfortunately since you can't change the originating branch for it, yes you'll have to create a new feature branch and accompanying new PR for that. please close this one with a comment referencing the new PR once you have opened it.
thank you @nikhiljohn10 !
Here is the New Pull Request -> #21
This was developed as a result of a bug found related to trailing "/" in the url. This will fix the bug and ignore the case in which use forget to add "/" in the end of url. It also enable the root of api not just to be "/", but anything that is passed along
new Router(base_url)
parameter.As per the updated index.js,
const r = new Router("/api/v1")
www.example.com/api/v1 => Hello worker www.example.com/api/v1/ => Hello worker www.example.com/api/v1/find/bar => responding for /bar www.example.com/api/v1/find/bar/ => responding for /bar www.example.com => resource not found www.example.com/ => resource not found