Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
168843d
commit bbdef9f
Showing
4 changed files
with
48 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
-> | ||
channel = postal.channel { channel: 'chat', topic:'message' } | ||
|
||
subscription = channel.subscribe (data, envelope) -> | ||
console.log data | ||
$('#display').append data | ||
|
||
$('#send').click -> | ||
console.log 'click' | ||
channel.publish {test: 'Hello!'} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
<p>Hello World</p> | ||
|
||
<script src="js/cannon.js"></script> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title></title> | ||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | ||
<script src="js/underscore.js"></script> | ||
<script> | ||
if (typeof jQuery == 'undefined') { | ||
document.write(unescape("%3Cscript src='jquery-1.8.2.min.js'%3E%3C/script%3E")); | ||
} | ||
</script> | ||
<script src="js/postal.js"></script> | ||
<script src="js/cannon.js"></script> | ||
</head> | ||
<body> | ||
<p>Hello World</p> | ||
<div id='display'></div> | ||
<button id='send'>send</button> | ||
</body> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
path = require 'path' | ||
connect = require 'connect' | ||
|
||
public = path.join __dirname, '../public' | ||
pub = path.join __dirname, '../public' | ||
app = connect() | ||
|
||
app.listen(4000) | ||
app.use(connect.static public) | ||
app.use(connect.static pub) |