Closed liuruoran88 closed 7 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed, please reply here (e.g. I signed it!
) and we'll verify. Thanks.
I signed it!
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.
ok, I have committed another new PR, please check again, thank you!
sw-toolbox has two options, Express-style Routes and Regular Expression Routes, for configuring the routes, but it's not flexible enough for users. If it can support configuring a custom function with the request object as an input param for url pattern,users can do more processing according to the request object. In order to meet this need, I have changed two files,
lib/router.js
andlib/route.js
, and added some test cases in the test folder. These changes will not affect the original Routes config.Your prompt attention to this matter will be appreciated.An example of using Function Expression routing include: