This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Forever works now on windows, I currently use it. | |
Just do: | |
npm install forever -g | |
and to run it, assuming you're in the app.js directory: | |
(sudo) forever -c node -w app.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A simple example of how to use Waterline v0.10 with Express | |
*/ | |
var express = require('express'), | |
_ = require('lodash'), | |
app = express(), | |
Waterline = require('waterline'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// api/services/passport.js | |
var passport = require('passport'); | |
var LocalStrategy = require('passport-local').Strategy; | |
var bcrypt = require('bcrypt-nodejs'); | |
passport.serializeUser(function(user, next) { | |
next(null, user.id); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// api/models/Account.js | |
module.exports = { | |
attributes: { | |
acct_id: { | |
type: 'int', | |
primaryKey: true | |
}, | |
loginName: { | |
type: 'string', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var truth = function() { return true; }; | |
var relativeTruth = function() { return false; }; | |
var assert = function(func) { | |
return func() == true; | |
}; | |
var wrapper = function(func) { | |
// perform setup work here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery TextChange Plugin | |
* http://www.zurb.com/playground/jquery-text-change-custom-event | |
* | |
* Copyright 2010, ZURB | |
* Released under the MIT License | |
*/ | |
(function ($) { | |
$.event.special.textchange = { |
NewerOlder