hapi-massive
Hapi plugin for massive.js 2.0
Install
var plugin = register: options: connectionString: "postgres://username:password@localhost/database" ; server
hapi-massive comes free with promises! Promises wrap all your sql files as well as the relational bits
Examples
Clean code! (Say that you have a table named user and a sql file named createUser.sql that returns a user object upon creation)
var db = requestplugins"hapi-massive"db;var userdeets = ...userinfo;db;
Or go crazy with generators! (using co.js)
var db = requestplugins"hapi-massive"db;;
Special thanks
Heavily inspired by hapi-node-postgres.
Promises brought to you by bluebird