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 fs = require('fs'); | |
var app = require('http').createServer(function(req, response){ | |
fs.readFile(__dirname+'/town.html', function(err, data){ | |
response.writeHead(200, {'Content-Type':'text/html'}); | |
response.write(data); | |
response.end(); | |
}); | |
}); | |
app.listen(80); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>The Town JS</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script> | |
<script type="text/javascript" src="/nowjs/now.js"></script> | |
<script type="text/javascript"> |
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 fs = require('fs'); | |
var app = require('http').createServer(function(req, response){ | |
fs.readFile(__dirname+'/hello.html', function(err, data){ | |
response.writeHead(200, {'Content-Type':'text/html'}); | |
response.write(data); | |
response.end(); | |
}); | |
}); | |
app.listen(80); | |
var io = require('/somewhere/node_modules/socket.io').listen(app); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Simplest Chat Room</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script> | |
<script src="/socket.io/socket.io.js"></script> | |
<script> | |
//DOCUMENT READY///////////////////////////////////////////////// | |
$(document).ready(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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Simplest Chat Room</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script> | |
<script src="/socket.io/socket.io.js"></script> | |
<script> | |
var socket = io.connect('http://theDomain.com'); | |
socket.on('news', function (data) { |
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 fs = require('fs'); | |
var app = require('http').createServer(function(req, response){ | |
fs.readFile(__dirname+'/hello.html', function(err, data){ | |
response.writeHead(200, {'Content-Type':'text/html'}); | |
response.write(data); | |
response.end(); | |
}); | |
}); | |
app.listen(80); | |
var io = require('/somewhere/node_modules/socket.io').listen(app); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Deck of Cards</title> | |
<meta charset="UTF-8" /> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="styles.css" /> | |
</head> | |
<body> |
NewerOlder