rendrjs / rendr

Render your Backbone.js apps on the client and the server, using Node.js.
MIT License
4.09k stars 312 forks source link

rendr with Hapi #468

Closed rutaihwa closed 8 years ago

rutaihwa commented 9 years ago

Not sure if this is a right platform for this question, but I have started to experiment with rendr, it make heavy use of express and all examples are based on it. Are there some docs on how to work with Hapi instead?

bigethan commented 9 years ago

Not that I'm aware of, rendr doesn't currently have a way of abstracting it's webserver, express is a pretty explicit dependency. But it doesn't do that much with it. The way the routes are processed and the way middleware is added would be the big things. I don't know hapi patterns well enough offhand to know how similar they are and if a little abstraction in Rendr would do the job.

rutaihwa commented 9 years ago

Although Hapi and Express are very similar, they are very much distinct especially when it comes express's middlewares against Hapi's plugins. The routings could be easy to wrap around but logics on the /server could require a rewrite or an interesting hack.

bigethan commented 9 years ago

Totally forgot about this one: http://lazojs.org/ is walmart's version of Rendr that uses Hapi. It's more of a framework than Rendr, but otherwise very similar.

rutaihwa commented 9 years ago

Thanks @bigethan, Im diving into lazo's codes and docs, i can wrap my head around it so far.