remove engine.io

No need for homepage to show this stuff for now. Just more things that
can crash the tunnel server!
This commit is contained in:
Roman Shtylman
2014-10-25 17:09:13 -07:00
parent 4a09dc114a
commit 73ec1865ab
4 changed files with 0 additions and 69 deletions

View File

@@ -14,9 +14,6 @@
"bookrc": "0.0.1",
"book-git": "0.0.2",
"book-raven": "1.0.1",
"engine.io": "0.7.12",
"engine.io-client": "0.7.12",
"flip-counter": "0.5.3",
"browserkthx": "0.0.2",
"hbs": "2.4.0",
"taters": "0.1.0",

View File

@@ -6,7 +6,6 @@ var enchilada = require('enchilada');
var stylish = require('stylish');
var makeover = require('makeover');
var makeup = require('makeup');
var engine = require('engine.io');
var browserkthx = require('browserkthx');
var tldjs = require('tldjs');
var on_finished = require('finished');
@@ -229,36 +228,6 @@ module.exports = function(opt) {
app_port = app_server.address().port;
});
// connected engine.io sockets for stats updates
var eio_sockets = [];
setInterval(function() {
eio_sockets.forEach(function(socket) {
socket.send(JSON.stringify(stats));
});
}, 1000);
var eio_server = engine.attach(app_server);
eio_server.on('connection', function (socket) {
eio_sockets.push(socket);
socket.send(JSON.stringify(stats));
socket.on('error', function(err) {
log.error(err);
socket.close();
});
socket.on('close', function() {
// remove from socket pool so no more updates are sent
var idx = eio_sockets.indexOf(socket);
if (idx >= 0) {
eio_sockets.splice(idx, 1);
}
});
});
var server = bouncy(function(req, res, bounce) {
debug('request %s', req.url);

View File

@@ -1,27 +1 @@
var eio = require('engine.io-client');
var flipCounter = require('flip-counter');
var user_counter = new flipCounter('user-count', {
value: 0,
pace: 10,
fW: 30,
tFH: 20,
bFH: 40,
bOffset: 200,
auto: false
});
var socket = eio();
socket.on('open', function () {});
socket.on('message', function (data) {
var msg = JSON.parse(data);
user_counter.incrementTo(msg.tunnels);
});
socket.on('close', function () {
user_counter.incrementTo(0);
});
// load google analytics after above starts
require('./ga');

View File

@@ -65,15 +65,6 @@ your url is: https://gqgh.localtunnel.me</pre></div>
<p>You can now share <em>https://gqgh.localtunnel.me</em> with anyone. As long as your local instance of <strong>lt</strong> is running, this url will remain active. Any requests to that url will be routed to your service on port 8000.</p>
<p>When you start and stop your tunnel, you will see it reflected in the active tunnel count below.</p>
<div class="row">
<div class="half">
<h3>Tunnels</h3>
<div id="user-count" class="flip-counter"></div>
</div>
</div>
<h2>other cool stuff</h2>
<h3><i class="fa fa-lock"></i> Secure https for all tunnels</h3>
<h3><i class="fa fa-desktop"></i> Show your work to anyone</h3>