Skip to content

Instantly share code, notes, and snippets.

View cthorne66's full-sized avatar

Chris Thorne cthorne66

View GitHub Profile

Day 1

May 27, 2015

Microsoft Developer Advocate for Internet Explorer. Contributing Editor to Smashing Mag.

Woah, You Can Test IE / Microsoft Edge on a Mac & Linux?

How can I know developers pain points without working in the same environment as developers. That's why I use a Mac.

@cthorne66
cthorne66 / core.js
Created May 24, 2013 17:36
This gist is one way of maintaining Backbone's idAttribute when calling the toJSON method of a model or collection. Though you have diligently mapped the idAttribute in your backbone models to work with data sources like MongoDB & CouchDB, when you use the toJSON method on models or collections, that same mapping does not hold. For the record, I…
/**
* core.js
* For helpers & overridden functions in Backbone objects
*/
'jquery',
'underscore',
'backbone'
], function($, _, Backbone){
/**
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');