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

Support for Koa? #5

Open
bishtawi opened this issue Apr 21, 2015 · 6 comments
Open

Support for Koa? #5

bishtawi opened this issue Apr 21, 2015 · 6 comments

Comments

@bishtawi
Copy link

Hi,
Any plans to support the koa web framework?

@jhollingworth
Copy link
Contributor

No plans right now to specifically implement Koa however I'm planning on abstracting the the internals so it's easy to add support for other web frameworks (e.g. Hapi)

Out of interest, beyond generators are there many differences with express?

@bishtawi
Copy link
Author

The biggest change was to replace callbacks with generators. They also combined the res and req objects into a single context (the this object) and moved a lot of things to middleware. There are others, but thats really the big obvious differences. I modified your source to make it work with Koa. All I did was turn it into a generator, replace res and req with the koa contex, replace the res.render function with React.renderToStaticMarkup and added support for document title and 404 error. It works well enough for me to continue with my project.

@tychotatitscheff
Copy link

I would add a big +1.
I can open a repo.

@bishtawi would you like to share some code. I was about to work on it but if you already done this start it would be nice.

@bishtawi
Copy link
Author

bishtawi commented May 5, 2015

Yeah, thats a good idea. I'll throw up the code I have up onto a repo later tonight. I didnt bother fixing the tests yet.

@bishtawi
Copy link
Author

bishtawi commented May 5, 2015

Alright, marty-koa is available here.
Let me know if you have any problems.

@tychotatitscheff
Copy link

Wow. Nice work indeed.
I would test it soon and open up issues if I have any problems.

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

No branches or pull requests

3 participants