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 express = require('express') | |
, app = express.createServer() | |
, routes = require('./routes') | |
, redis = require('redis') | |
; | |
var app = module.exports = express.createServer(); | |
app.listen(8080, function() { |
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
!!! | |
html | |
head | |
title= title | |
link(rel='stylesheet', href='/stylesheets/style.css') | |
script(type='text/javascript', src='/js/jquery.js') | |
script(type='text/javascript', src='/socket.io/socket.io.js') | |
script(type='text/javascript', src='/js/script.js') | |
body!= body |
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
$(document).ready(function() { | |
console.log('connecting...'); | |
connect(); | |
}); | |
function connect() { | |
console.log('connecting to ' + window.location.host); | |
var socket = new io.connect('http://' + window.location.host); |
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
// object: | |
function Person(yearsOld) { | |
// internal properties | |
var _Person | |
, age = yearsOld | |
, height = 71 | |
, firstName = "Zack" | |
, lastName = "Michener"; | |
// internal methods |