comparison to expressjs?

112 views
Skip to first unread message

@siculars

unread,
Feb 8, 2012, 3:09:48 PM2/8/12
to Flatiron
First off, grats for putting together a good looking but more
importantly, functional project. I would like to know how interesting
it would be to move an express project to flatiron. I have such a
project that is currently locked into whichever version of express
sits on top of the last 0.4.x node release. It's due for a refresh,
mostly to get on the latest version of node. By interesting I mostly
mean difficult. From the looks of it, I think I would just have to
migrate my routes to your version of their app.js.

Thoughts?

Also, are there thoughts to closely integrate some of the other
interesting nodejitsu libs like hookio so that flatiron can more
easily take advantage of them?

Thanks!

-alexander

jesusabdullah

unread,
Feb 10, 2012, 10:35:35 PM2/10/12
to Flatiron
Hi Alexander!

Welcome to the mailing list!

Migrating projects from express to flatiron is relatively easy. Our
middleware stack, union, contains a stack of middlewares it will run
before the main router in the 'before' property. You can see examples
of this at https://github.com/flatiron/union and
https://github.com/jesusabdullah/node-ecstatic . You can also write
various types of shims for your middlewares to use inside director
routes or in a plugin. I just wrote a library that does this earlier
today at https://github.com/jesusabdullah/node-equip .

I'd say my biggest suggestion with respect to using flatiron right now
would be to use hard versions for the less mature projects.

I also wrote a small hook.io plugin for broadway that looks like this:

https://gist.github.com/1795820

You may find it helpful.

--Josh
Reply all
Reply to author
Forward
0 new messages