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 http = require('http'); | |
var util = require('util'); | |
var path = require('path'); | |
var chromesMinimumByteFix = " "; | |
var server = http.createServer(function(req, res){ | |
var pathParts = req.url.split('/'); | |
pathParts.shift(); | |
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
ReferenceError: module is not defined | |
at IncomingMessage.anonymous (eval at <anonymous> (/usr/local/lib/node/.npm/ejs/0.3.0/package/lib/ejs/index.js:139:14)) | |
at IncomingMessage.<anonymous> (/usr/local/lib/node/.npm/ejs/0.3.0/package/lib/ejs/index.js:141:19) | |
at Object.render (/usr/local/lib/node/.npm/ejs/0.3.0/package/lib/ejs/index.js:176:13) | |
at ServerResponse.render (/usr/local/lib/node/.npm/express/1.0.7/package/lib/express/view.js:334:22) | |
at ServerResponse.partial (/usr/local/lib/node/.npm/express/1.0.7/package/lib/express/view.js:200:17) | |
at Object.<anonymous> (/usr/local/lib/node/.npm/express/1.0.7/package/lib/express/view.js:311:25) | |
at IncomingMessage.anonymous (eval at <anonymous> (/usr/local/lib/node/.npm/ejs/0.3.0/package/lib/ejs/index.js:139:14)) | |
at IncomingMessage.<anonymous> (/usr/local/lib/node/.npm/ejs/0.3.0/package/lib/ejs/index.js:141:19) | |
at Object.render (/usr/local/lib/node/.npm/ejs/0.3.0/package/lib/ejs/index.js:176:13) |
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
$ npm update | |
npm info it worked if it ends with ok | |
npm info using npm@0.3.0-6 | |
npm info using node@v0.4.0 | |
npm info updates connect@0.5.10 resware@0.0.3 qs@0.0.6 | |
npm info preupdate connect@0.5.10 | |
npm info preupdate resware@0.0.3 | |
npm info preupdate qs@0.0.6 | |
npm ERR! gzip "--decompress" "--stdout" "/usr/local/lib/node/.npm/.cache/resware/0.0.3/package.tgz" | |
npm ERR! gzip "--decompress" "--stdout" "/usr/local/lib/node/.npm/.cache/resware/0.0.3/package.tgz" gzip: /usr/local/lib/node/.npm/.cache/resware/0.0.3/package.tgz: unexpected end of file |
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
# Run each statement separately, not all at once | |
CREATE TABLE `posts` ( | |
`post_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, | |
`user_id` int(10) unsigned NOT NULL DEFAULT '0', | |
`date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', | |
`active` tinyint(2) NOT NULL DEFAULT '0', | |
PRIMARY KEY (`post_id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=190 DEFAULT CHARSET=utf8; |
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 mysql = require('mysql'); | |
var db = new mysql.Client({ | |
user: 'root', | |
password: '', | |
database: 'main' | |
}); | |
db.connect(); |
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
$ node test.js | |
0.5961614400148392 | |
0.5961614400148392 |
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 http = require('http'); | |
var mysql = require('mysql'); | |
var db = mysql.createClient({ | |
user: 'root', | |
password: 'password', | |
database: 'db1' | |
}); | |
db.query("BEGIN"); // Start first transaction |
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 db = require('./exports-the-db-connection.js'); | |
var http = require('http'); | |
http.createServer(function(req, res){ | |
if (req.url == '/A') | |
DoA(); | |
else if (req.url == '/B') | |
DoB(); | |
else |
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
PS C:\Users\UserName\Programming\ProjectName> npm install email-templates-windows | |
npm http GET https://registry.npmjs.org/email-templates-windows | |
npm http 200 https://registry.npmjs.org/email-templates-windows | |
npm http GET https://registry.npmjs.org/email-templates-windows/-/email-templates-windows-0.0.1.tgz | |
npm http 200 https://registry.npmjs.org/email-templates-windows/-/email-templates-windows-0.0.1.tgz | |
npm http GET https://github.com/niftylettuce/juice/tarball/windows | |
npm http GET https://registry.npmjs.org/async/0.1.22 | |
npm http GET https://registry.npmjs.org/ejs/0.7.1 | |
npm http 304 https://registry.npmjs.org/async/0.1.22 | |
npm http 304 https://registry.npmjs.org/ejs/0.7.1 |
OlderNewer