tjmehta / coworkers

A RabbitMQ Microservice Framework in Node.js
MIT License
610 stars 36 forks source link

Use async/await instead of generators as per Koa v2 #35

Open pritchardjonathan opened 8 years ago

pritchardjonathan commented 8 years ago

https://github.com/koajs/koa

tjmehta commented 8 years ago

Koa has only pulled that functionality into their "next" branch/version. We could maintain the same w/ coworkers until async/await is node native

tjmehta commented 8 years ago

Please vote here if you want this functionality

DaAwesomeP commented 8 years ago

+1

DaAwesomeP commented 8 years ago

Compatibility with something like asyncawait would be nice as well.

DaAwesomeP commented 8 years ago

@tjmehta you probably won't get very many votes here because the ratios of stargazers to watchers in this repo is very high.

tjmehta commented 8 years ago

That's true. If we can support both without having to maintain a "next" version like koa, I would be happy to take a PR. If we cannot support both I will probably still take a PR and maintain both versions. I personally don't use Babel on the server side, so I personally wouldn't implement it in until node supports async/await.

mkozjak commented 8 years ago

+1 for this functionality.

koa@next uses https://www.npmjs.com/package/koa-convert to check if a given middleware is generator based and converts it to a promise.

amcdnl commented 7 years ago

@tjmehta Node supports async/await now ;P

tjmehta commented 7 years ago

Unstable only though right? I am willing to get a branch ready with support if someone wants to take initiative. I am thinking I want to remove clustering too if we make it a breaking change On Thu, Feb 16, 2017 at 10:44 AM Austin notifications@github.com wrote:

@tjmehta https://github.com/tjmehta Node supports async/await now ;P

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tjmehta/coworkers/issues/35#issuecomment-280366943, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnFF_OL2j8X7vkQa9t-GgLPeJomeM4xks5rdG7IgaJpZM4H73bz .

amcdnl commented 7 years ago

It was introduced at Node 7, node is at 7.5 now so I'd say it is ;P

tjmehta commented 7 years ago

Odd majors are considered unstable in node, but I am cool with preparing for 8 at this point On Thu, Feb 16, 2017 at 10:49 AM Austin notifications@github.com wrote:

It was introduced at Node 7, node is at 7.5 now so I'd say it is ;P

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tjmehta/coworkers/issues/35#issuecomment-280368486, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnFF0a7JkrqnXNe1JL6jxyZ9DZl7Yuaks5rdG_zgaJpZM4H73bz .

amcdnl commented 7 years ago

+1

You mentioned removing clustering? Whats the motivation behind that?

john24318 commented 7 years ago

+1

amcdnl commented 7 years ago

@tjmehta - any updates on moving this ahead now that async/await is in node 8.0?

tjmehta commented 7 years ago

I was thinking about this the other day. I am happy to take PRs and will eventually get to it, however syntactic sugar leaves this low on my development priority list. I will continue to maintain any issues people have with coworkers, but I am just not sure I have bandwidth to take on this task soon.

On Fri, Jul 7, 2017 at 1:33 PM Austin notifications@github.com wrote:

@tjmehta https://github.com/tjmehta - any updates on moving this ahead now that async/await is in node 8.0?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tjmehta/coworkers/issues/35#issuecomment-313786231, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnFF03qeB_itmh9ANcO2jFSlrEXbd0dks5sLpYRgaJpZM4H73bz .