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
/** | |
* Module dependencies. | |
*/ | |
var express = require('express'); | |
// Create the server | |
app = express.createServer(); |
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
Joshua-Smiths-MacBook-Pro:wadsup joshsmith$ jitsu logs app wadsupinfo: Welcome to Nodejitsu | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command logs app wadsup | |
info: Authenticated as joshsmith | |
data: 2011-12-02T07:22:53.644Z: ...finished step | |
data: 2011-12-02T07:22:53.644Z: starting step - compile | |
data: 2011-12-02T07:22:53.644Z: ...finished step | |
data: 2011-12-02T07:22:53.644Z: starting step - addToSession | |
data: 2011-12-02T07:22:53.644Z: ...finished step | |
data: 2011-12-02T07:22:53.644Z: starting step - sendResponse |
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
{ error: null, | |
ended: false, | |
maxFieldsSize: 2097152, | |
keepExtensions: false, | |
uploadDir: '/Users/joshsmith/Sites/Node/wadsup/tmp', | |
encoding: 'utf-8', | |
headers: | |
{ host: 'localhost:3000', | |
connection: 'keep-alive', | |
'content-length': '226812', |
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
Joshua-Smiths-MacBook-Pro:wadsup joshsmith$ jitsu deploy | |
info: Welcome to Nodejitsu | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Authenticated as joshsmith | |
info: Analyzing your application dependencies in app.js | |
warn: No application exists for wadsup | |
info: Checking app availability wadsup | |
error: Error creating wadsup | |
error: App name / subdomain combination is not available |
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
♢ InterestModel | |
The InterestModel can get an interest by name | |
✓ should be named "28 Days Later" | |
✓ OK » 1 honored (0.006s) |
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
user.save().on('success', function(user) { | |
callback(user); | |
}) | |
.on('failure', function(error) { | |
callback(error); | |
}); |
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
user.save().on('success', function(user) { | |
callback(null, user); | |
}).on('failure', function(error) { | |
callback(user); | |
}); |
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
LOAD DATA LOCAL INFILE '/Users/joshsmith/worldcitiespop.csv' | |
INTO TABLE cities | |
FIELDS TERMINATED BY ',' | |
LINES TERMINATED BY '\n' | |
(country,ascii,city,region,population,latitude,longitude); |
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-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])? |
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 Company = function() { | |
this.crypto = require('ezcrypto').Crypto; | |
} | |
// Create the company | |
Company.prototype.create = function (name, contact, email, password) { | |
result = this.hashPassword(password); | |
if (err) { | |
return callback(err); |