Jacob Burden
@jekrb
But highly opinionated.
Extra http request.
Single giant.js
Terminal
npm install underscore --save
isNull.js
var _ = require('underscore') console.log(_.isNull(null)) // true
This file is larger than it seems.
isNull.js
module.exports = function isNull(obj) { return obj === null }
isNumber.js
var toString = Object.prototype.toString module.exports = function isNumber(obj) { return toString.call(obj) === '[object Number]' }
entry.js
var isNull = require('./isNull.js') var isNumber = require('./isNumber.js') console.log(isNull(null)) //true console.log(isNumber(1337)) //true
browserify entry.js > app.bundle.js
beefy entry.js
beefy (v2.1.1) is listening on http://127.0.0.1:9966
var Hapi = require('hapi') var server = new Hapi.Server('localhost', config.http.port) var moonboots = require('moonboots_hapi') var moonbootsConfig = require('./moonbootsConfig') server.pack.register({plugin: moonboots, options: moonbootsConfig}, function (err) { if (err) throw err; server.start(function (err) { if (err) throw err; }); });
module.exports = { moonboots: { main: __dirname + '/client/app.bundle.js'