Skip to content

Instantly share code, notes, and snippets.

View alpercitak's full-sized avatar

Alper Çıtak alpercitak

  • Amsterdam, Netherlands
View GitHub Profile
var db = require('./db'),
util = require('util'),
max = 2;
var ormify = function (o, base) {
if (!o) return {};
var r = {};
var traverse = function (t, arr) {
if (arr.length == 1) return;
var s = arr[0];
var Promise = require('bluebird'),
mysql = require('mysql'),
using = Promise.using;
Promise.promisifyAll(require("mysql/lib/Connection").prototype);
Promise.promisifyAll(require("mysql/lib/Pool").prototype);
var env = (process.env.NODE_ENV == 'production') ? 'prod': 'dev';
var pools = {};
var base = {