Skip to content

Instantly share code, notes, and snippets.

View limptwiglet's full-sized avatar
🎯
Focusing

Mark Gerrard limptwiglet

🎯
Focusing
View GitHub Profile
var validateUnique = function(model, field){
return function(form, field, callback){
var model = db.model(model);
var q = {};
q[field] = form.data[field];
model.findOne(q, 'name', function(err, doc){
});
};
@limptwiglet
limptwiglet / fsf
Created December 13, 2011 13:03
flatiron example
// libs
var flatiron = require('flatiron');
var fs = require('fs');
// create app
var app = flatiron.app;
app.use(flatiron.plugins.http);
// router logic
app.router.get('/', function () {