Hapi, new Node.js framework (a prologue)
hueniverse.com
hueniverse.com
That said, I'm a huge fan of Meteor. It is (almost) totally non-traditional, but granted it does not give you the fine-grained control of this framework. I can see Hapi being the correct choice if either a) your developers are uncomfortable with large paradigm shifts (and seriously, who can blame them?) or b) you have to conform to a pre-existing API that requires low-level control (which is, of course, a total bummer).
Very nice work - and from my skimming of your docs, very nice documentation. Lots of good info in there without a lot of fluff, and I like that it's all on one page. Kudos. I'll definitely try Hapi instead of Connect next time I need something like this.
In particular, I'm excited about the way endpoints are registered:
// Define the route
var hello = {
handler: function (request) {
request.reply({ greeting: 'hello world' });
}
};
// Add the route
server.addRoute({
method: 'GET',
path: '/hello',
config: hello
});
This makes it extremely easy to expose API endpoints to internal modules. Let's
say your company has a module related to simple math operations -- exposing this
externally is as simple as adding a 'handler' method. var SimpleMath = new function() {
var module = this;
module.divide = function(a, b) {
return a / b;
};
module.multiply = function(a, b) {
return a * b;
};
// Now add the external handler.
module.handler = function(request) {
// somehow access two variables, a and b
request.reply({
product: module.multiply(a, b);
quotient: module.divide(a, b);
});
}I'm sorry but how is that different than
app.get('/hello', require('simplemath'));
where simplemath is module.exports = function(req, res) { ... }With the long list of things checked out, I doubt they gave the "few others" a close look. Which is too bad, because Geddy may have been just the ticket.
Releasing software like this makes me wonder what other kind of amazing things are going on at Walmart Labs. They have an incredible amount of data about shopping behavior.
Thanks for releasing this guys!