Skip to content

Instantly share code, notes, and snippets.

@jeffgca
Last active December 11, 2015 10:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffgca/4590856 to your computer and use it in GitHub Desktop.
Save jeffgca/4590856 to your computer and use it in GitHub Desktop.
My current node.js boilerplate
#!/usr/bin/env node
var util = require('util'),
fs = require('fs'),
path = require('path'),
mysql = require('mysql'),
moment = require('moment-range'),
async = require('async'),
csv = require('csv'),
YAML = require('libyaml'),
_ = require('underscore');
var L = console.log,
D = function(o) { L(util.inspect(o)); },
F = function(s) { return util.format.apply(null, arguments); };
function getConfig(path) {
var docs = YAML.readFileSync(path);
return docs[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment