Skip to content

Commit

Permalink
Merge pull request socketio#209 from defunctzombie/latency-example-fix
Browse files Browse the repository at this point in the history
fix latency example
  • Loading branch information
rauchg committed Jan 6, 2014
2 parents bd94d27 + 9e38c26 commit b14e3c1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 26 deletions.
2 changes: 0 additions & 2 deletions examples/latency/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ First, execute:

```
$ npm install
$ component install
$ component build
```

Then execute the server:
Expand Down
16 changes: 0 additions & 16 deletions examples/latency/component.json

This file was deleted.

7 changes: 2 additions & 5 deletions examples/latency/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
<html>
<head>
<title>EIO Latency</title>
<link rel="stylesheet" href="/build.css" />
<link rel="stylesheet" href="/style.css" />
</head>
<body>
<h1>EIO Latency <span id="latency"></span></h1>
<h2 id="transport">(connecting)</h2>
<canvas id="chart" height="200"></canvas>

<script src="/build.js"></script>
<script>
require("eio-latency");
</script>
<script src="/index.js"></script>
</body>
</html>
7 changes: 6 additions & 1 deletion examples/latency/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@
var express = require('express')
, app = express()
, server = require('http').createServer(app)
, enchilada = require('enchilada')
, io = require('engine.io').attach(server);

app.use(express.static('build'));
app.use(enchilada({
src: __dirname + '/public',
debug: true
}));
app.use(express.static(__dirname + '/public'));
app.get('/', function(req, res, next){
res.sendfile('index.html');
});
Expand Down
5 changes: 4 additions & 1 deletion examples/latency/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "0.1.0",
"dependencies": {
"express": "3.3.5",
"engine.io": "0.7.0"
"enchilada": "0.7.1",
"engine.io": "0.8.0",
"engine.io-client": "0.8.0",
"smoothie": "1.19.0"
}
}
2 changes: 1 addition & 1 deletion examples/latency/public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

var SmoothieChart = require("smoothie").SmoothieChart
, TimeSeries = require("smoothie").TimeSeries
, eio = require("engine.io");
, eio = require("engine.io-client");


// helper
Expand Down

0 comments on commit b14e3c1

Please sign in to comment.