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

feat: async router #379

Merged
merged 5 commits into from Dec 25, 2019
Merged

feat: async router #379

merged 5 commits into from Dec 25, 2019

Conversation

LiranBri
Copy link
Contributor

hello,
this PR adds support for options.router for async handlers.

It came up in this issue: #153

I would be glad to also add tests, but it seems like instructions are missing since it expects a running server on port 8000/3000.. please provide and i'll complete the tests

@ghost
Copy link

ghost commented Dec 12, 2019

DeepCode's analysis on #11de79 found:

  • 0 critical issues. ⚠️ 0 warnings and 0 minor issues. ✔️ 0 issues were fixed.

💬 This comment has been generated by the DeepCode bot, installed by the owner of the repository. The DeepCode bot protects your repository by detecting and commenting on security vulnerabilities or other critical issues.


☺️ If you want to provide feedback on our bot, here is how to contact us.

@chimurai
Copy link
Owner

chimurai commented Dec 15, 2019

Thanks for the PR.

You can run the tests with yarn test

The port issue your running into are the e2e tests.
They actually start a server and fire a request, assert the response from the mocked target.
The e2e setup is a bit dated and might be harder to work with.

@coveralls
Copy link

coveralls commented Dec 16, 2019

Coverage Status

Coverage increased (+0.09%) to 93.458% when pulling 11de79f on LiranBri:feat/async-router into 3b97308 on chimurai:master.

@LiranBri
Copy link
Contributor Author

@chimurai tests added :)

@chimurai
Copy link
Owner

Awesome!

Could you update the README.md with a tiny async example. Just to indicate router support async functions.

option.router

// Custom async router function
router: async function(req) {
    return 'http://localhost:8004';
}

@LiranBri
Copy link
Contributor Author

@chimurai looks good?

@chimurai chimurai merged commit 2621cd3 into chimurai:master Dec 25, 2019
@chimurai
Copy link
Owner

Thanks! Published beta version 0.21.0-beta.1

When it looks ok shortly, I'll publish 0.21.0 final

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

Successfully merging this pull request may close these issues.

None yet

3 participants