Skip to content

Instantly share code, notes, and snippets.

View zachariahtimothy's full-sized avatar

Zach Curtis zachariahtimothy

View GitHub Profile
@zachariahtimothy
zachariahtimothy / apiServer.js
Created April 24, 2013 19:49
Express as an API application exported for interoperability with Grunt.
/**
* Module dependencies.
*/
var express = require('express');
var http = require('http');
var app = express();
// all environments
app.use(express.favicon());
@zachariahtimothy
zachariahtimothy / Gruntfile.js
Created April 24, 2013 19:45
Grunt calling Express Node API Application
// Generated on 2013-04-23 using generator-webapp 0.1.7
'use strict';
var path = require('path');
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to match all subfolders:
// 'test/spec/**/*.js'
(function( $ ){
var rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
rCRLF = /\r?\n/g,
rselectTextarea = /^(?:select|textarea)/i;
$.prototype.serialize = function(args){
var options = args || {};
return this.map(function(){
return this.elements ? jQuery.makeArray( this.elements ) : this;
})