Skip to content

Commit

Permalink
browser example
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Nov 25, 2012
1 parent 0557b39 commit 6192cb5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/static/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
browserify ../timing.js -o bundle.js
21 changes: 21 additions & 0 deletions example/static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!doctype html>
<html>
<head>
<style>
body {
font-family: monospace;
white-space: pre;
}
</style>
</head>
<body>
<script>
if (typeof console === 'undefined') console = {};
console.log = function (msg) {
var txt = document.createTextNode(msg);
document.body.appendChild(txt);
};
</script>
<script src="bundle.js"></script>
</body>
</html>
4 changes: 4 additions & 0 deletions example/static/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var http = require('http');
var ecstatic = require('ecstatic')(__dirname);
var server = http.createServer(ecstatic);
server.listen(8000);

0 comments on commit 6192cb5

Please sign in to comment.