mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2026-01-04 03:54:51 +01:00
composer and npm
This commit is contained in:
8
conf/site/node_modules/sockjs/Changelog
generated
vendored
8
conf/site/node_modules/sockjs/Changelog
generated
vendored
@@ -1,3 +1,11 @@
|
||||
0.3.20
|
||||
======
|
||||
* Updated `node-uuid` and `coffeescript`
|
||||
* Exclude `examples`, `tests`, and `Makefile` from npm package
|
||||
* Update examples to use latest jQuery and sockjs-client #271
|
||||
* Don't call `res.end` in `writeHead` #266
|
||||
* Pin `websocket-driver` as later versions cause some tests from `sockjs-protocol` to fail
|
||||
|
||||
0.3.19
|
||||
======
|
||||
|
||||
|
||||
39
conf/site/node_modules/sockjs/Makefile
generated
vendored
39
conf/site/node_modules/sockjs/Makefile
generated
vendored
@@ -1,39 +0,0 @@
|
||||
.PHONY: all serve clean
|
||||
|
||||
COFFEE:=./node_modules/.bin/coffee
|
||||
|
||||
#### General
|
||||
|
||||
all: build
|
||||
|
||||
build: src/*coffee
|
||||
@$(COFFEE) -v > /dev/null
|
||||
$(COFFEE) -o lib/ -c src/*.coffee
|
||||
|
||||
clean:
|
||||
rm -f lib/*.js
|
||||
|
||||
|
||||
#### Testing
|
||||
|
||||
test_server: build
|
||||
node tests/test_server/server.js
|
||||
|
||||
serve:
|
||||
@if [ -e .pidfile.pid ]; then \
|
||||
kill `cat .pidfile.pid`; \
|
||||
rm .pidfile.pid; \
|
||||
fi
|
||||
|
||||
@while [ 1 ]; do \
|
||||
make build; \
|
||||
echo " [*] Running http server"; \
|
||||
make test_server & \
|
||||
SRVPID=$$!; \
|
||||
echo $$SRVPID > .pidfile.pid; \
|
||||
echo " [*] Server pid: $$SRVPID"; \
|
||||
inotifywait -r -q -e modify .; \
|
||||
kill `cat .pidfile.pid`; \
|
||||
rm -f .pidfile.pid; \
|
||||
sleep 0.1; \
|
||||
done
|
||||
6
conf/site/node_modules/sockjs/README.md
generated
vendored
6
conf/site/node_modules/sockjs/README.md
generated
vendored
@@ -48,7 +48,7 @@ A simplified echo SockJS server could look more or less like:
|
||||
var http = require('http');
|
||||
var sockjs = require('sockjs');
|
||||
|
||||
var echo = sockjs.createServer({ sockjs_url: 'http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js' });
|
||||
var echo = sockjs.createServer();
|
||||
echo.on('connection', function(conn) {
|
||||
conn.on('data', function(message) {
|
||||
conn.write(message);
|
||||
@@ -90,7 +90,7 @@ var sockjs_server = sockjs.createServer(options);
|
||||
Where `options` is a hash which can contain:
|
||||
|
||||
<dl>
|
||||
<dt>sockjs_url (string, required)</dt>
|
||||
<dt>sockjs_url (string)</dt>
|
||||
<dd>Transports which don't support cross-domain communication natively
|
||||
('eventsource' to name one) use an iframe trick. A simple page is
|
||||
served from the SockJS server (using its foreign domain) and is
|
||||
@@ -99,7 +99,7 @@ Where `options` is a hash which can contain:
|
||||
domain local to the SockJS server. This iframe also does need to
|
||||
load SockJS javascript client library, and this option lets you specify
|
||||
its url (if you're unsure, point it to
|
||||
<a href="http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js">
|
||||
<a href="https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js">
|
||||
the latest minified SockJS client release</a>, this is the default).
|
||||
You must explicitly specify this url on the server side for security
|
||||
reasons - we don't want the possibility of running any foreign
|
||||
|
||||
15
conf/site/node_modules/sockjs/examples/echo/README.md
generated
vendored
15
conf/site/node_modules/sockjs/examples/echo/README.md
generated
vendored
@@ -1,15 +0,0 @@
|
||||
SockJS-node Echo example
|
||||
========================
|
||||
|
||||
To run this example, first install dependencies:
|
||||
|
||||
npm install
|
||||
|
||||
And run a server:
|
||||
|
||||
node server.js
|
||||
|
||||
|
||||
That will spawn an http server at http://127.0.0.1:9999/ which will
|
||||
serve both html (served from the current directory) and also SockJS
|
||||
server (under the [/echo](http://127.0.0.1:9999/echo) path).
|
||||
71
conf/site/node_modules/sockjs/examples/echo/index.html
generated
vendored
71
conf/site/node_modules/sockjs/examples/echo/index.html
generated
vendored
@@ -1,71 +0,0 @@
|
||||
<!doctype html>
|
||||
<html><head>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
||||
<script src="http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"></script>
|
||||
<style>
|
||||
.box {
|
||||
width: 300px;
|
||||
float: left;
|
||||
margin: 0 20px 0 20px;
|
||||
}
|
||||
.box div, .box input {
|
||||
border: 1px solid;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
margin: 5px;
|
||||
}
|
||||
.box div {
|
||||
border-color: grey;
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
.box input {
|
||||
height: 30px;
|
||||
}
|
||||
h1 {
|
||||
margin-left: 30px;
|
||||
}
|
||||
body {
|
||||
background-color: #F0F0F0;
|
||||
font-family: "Arial";
|
||||
}
|
||||
</style>
|
||||
</head><body lang="en">
|
||||
<h1>SockJS Echo example</h1>
|
||||
|
||||
<div id="first" class="box">
|
||||
<div></div>
|
||||
<form><input autocomplete="off" value="Type here..."></input></form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var sockjs_url = '/echo';
|
||||
var sockjs = new SockJS(sockjs_url);
|
||||
$('#first input').focus();
|
||||
|
||||
var div = $('#first div');
|
||||
var inp = $('#first input');
|
||||
var form = $('#first form');
|
||||
|
||||
var print = function(m, p) {
|
||||
p = (p === undefined) ? '' : JSON.stringify(p);
|
||||
div.append($("<code>").text(m + ' ' + p));
|
||||
div.append($("<br>"));
|
||||
div.scrollTop(div.scrollTop()+10000);
|
||||
};
|
||||
|
||||
sockjs.onopen = function() {print('[*] open', sockjs.protocol);};
|
||||
sockjs.onmessage = function(e) {print('[.] message', e.data);};
|
||||
sockjs.onclose = function() {print('[*] close');};
|
||||
|
||||
form.submit(function() {
|
||||
print('[ ] sending', inp.val());
|
||||
sockjs.send(inp.val());
|
||||
inp.val('');
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
</body></html>
|
||||
8
conf/site/node_modules/sockjs/examples/echo/package.json
generated
vendored
8
conf/site/node_modules/sockjs/examples/echo/package.json
generated
vendored
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"name": "sockjs-echo",
|
||||
"version": "0.0.0-unreleasable",
|
||||
"dependencies": {
|
||||
"node-static": "0.5.9",
|
||||
"sockjs": "*"
|
||||
}
|
||||
}
|
||||
30
conf/site/node_modules/sockjs/examples/echo/server.js
generated
vendored
30
conf/site/node_modules/sockjs/examples/echo/server.js
generated
vendored
@@ -1,30 +0,0 @@
|
||||
var http = require('http');
|
||||
var sockjs = require('sockjs');
|
||||
var node_static = require('node-static');
|
||||
|
||||
// 1. Echo sockjs server
|
||||
var sockjs_opts = {sockjs_url: "http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"};
|
||||
|
||||
var sockjs_echo = sockjs.createServer(sockjs_opts);
|
||||
sockjs_echo.on('connection', function(conn) {
|
||||
conn.on('data', function(message) {
|
||||
conn.write(message);
|
||||
});
|
||||
});
|
||||
|
||||
// 2. Static files server
|
||||
var static_directory = new node_static.Server(__dirname);
|
||||
|
||||
// 3. Usual http stuff
|
||||
var server = http.createServer();
|
||||
server.addListener('request', function(req, res) {
|
||||
static_directory.serve(req, res);
|
||||
});
|
||||
server.addListener('upgrade', function(req,res){
|
||||
res.end();
|
||||
});
|
||||
|
||||
sockjs_echo.installHandlers(server, {prefix:'/echo'});
|
||||
|
||||
console.log(' [*] Listening on 0.0.0.0:9999' );
|
||||
server.listen(9999, '0.0.0.0');
|
||||
71
conf/site/node_modules/sockjs/examples/express-3.x/index.html
generated
vendored
71
conf/site/node_modules/sockjs/examples/express-3.x/index.html
generated
vendored
@@ -1,71 +0,0 @@
|
||||
<!doctype html>
|
||||
<html><head>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
||||
<script src="http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"></script>
|
||||
<style>
|
||||
.box {
|
||||
width: 300px;
|
||||
float: left;
|
||||
margin: 0 20px 0 20px;
|
||||
}
|
||||
.box div, .box input {
|
||||
border: 1px solid;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
margin: 5px;
|
||||
}
|
||||
.box div {
|
||||
border-color: grey;
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
.box input {
|
||||
height: 30px;
|
||||
}
|
||||
h1 {
|
||||
margin-left: 30px;
|
||||
}
|
||||
body {
|
||||
background-color: #F0F0F0;
|
||||
font-family: "Arial";
|
||||
}
|
||||
</style>
|
||||
</head><body lang="en">
|
||||
<h1>SockJS Express example</h1>
|
||||
|
||||
<div id="first" class="box">
|
||||
<div></div>
|
||||
<form><input autocomplete="off" value="Type here..."></input></form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var sockjs_url = '/echo';
|
||||
var sockjs = new SockJS(sockjs_url);
|
||||
$('#first input').focus();
|
||||
|
||||
var div = $('#first div');
|
||||
var inp = $('#first input');
|
||||
var form = $('#first form');
|
||||
|
||||
var print = function(m, p) {
|
||||
p = (p === undefined) ? '' : JSON.stringify(p);
|
||||
div.append($("<code>").text(m + ' ' + p));
|
||||
div.append($("<br>"));
|
||||
div.scrollTop(div.scrollTop()+10000);
|
||||
};
|
||||
|
||||
sockjs.onopen = function() {print('[*] open', sockjs.protocol);};
|
||||
sockjs.onmessage = function(e) {print('[.] message', e.data);};
|
||||
sockjs.onclose = function() {print('[*] close');};
|
||||
|
||||
form.submit(function() {
|
||||
print('[ ] sending', inp.val());
|
||||
sockjs.send(inp.val());
|
||||
inp.val('');
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
</body></html>
|
||||
8
conf/site/node_modules/sockjs/examples/express-3.x/package.json
generated
vendored
8
conf/site/node_modules/sockjs/examples/express-3.x/package.json
generated
vendored
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"name": "sockjs-express",
|
||||
"version": "0.0.0-unreleasable",
|
||||
"dependencies": {
|
||||
"express": "~3*",
|
||||
"sockjs": "*"
|
||||
}
|
||||
}
|
||||
26
conf/site/node_modules/sockjs/examples/express-3.x/server.js
generated
vendored
26
conf/site/node_modules/sockjs/examples/express-3.x/server.js
generated
vendored
@@ -1,26 +0,0 @@
|
||||
var express = require('express');
|
||||
var sockjs = require('sockjs');
|
||||
var http = require('http');
|
||||
|
||||
// 1. Echo sockjs server
|
||||
var sockjs_opts = {sockjs_url: "http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"};
|
||||
|
||||
var sockjs_echo = sockjs.createServer(sockjs_opts);
|
||||
sockjs_echo.on('connection', function(conn) {
|
||||
conn.on('data', function(message) {
|
||||
conn.write(message);
|
||||
});
|
||||
});
|
||||
|
||||
// 2. Express server
|
||||
var app = express(); /* express.createServer will not work here */
|
||||
var server = http.createServer(app);
|
||||
|
||||
sockjs_echo.installHandlers(server, {prefix:'/echo'});
|
||||
|
||||
console.log(' [*] Listening on 0.0.0.0:9999' );
|
||||
server.listen(9999, '0.0.0.0');
|
||||
|
||||
app.get('/', function (req, res) {
|
||||
res.sendfile(__dirname + '/index.html');
|
||||
});
|
||||
71
conf/site/node_modules/sockjs/examples/express/index.html
generated
vendored
71
conf/site/node_modules/sockjs/examples/express/index.html
generated
vendored
@@ -1,71 +0,0 @@
|
||||
<!doctype html>
|
||||
<html><head>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
||||
<script src="http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"></script>
|
||||
<style>
|
||||
.box {
|
||||
width: 300px;
|
||||
float: left;
|
||||
margin: 0 20px 0 20px;
|
||||
}
|
||||
.box div, .box input {
|
||||
border: 1px solid;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
margin: 5px;
|
||||
}
|
||||
.box div {
|
||||
border-color: grey;
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
.box input {
|
||||
height: 30px;
|
||||
}
|
||||
h1 {
|
||||
margin-left: 30px;
|
||||
}
|
||||
body {
|
||||
background-color: #F0F0F0;
|
||||
font-family: "Arial";
|
||||
}
|
||||
</style>
|
||||
</head><body lang="en">
|
||||
<h1>SockJS Express example</h1>
|
||||
|
||||
<div id="first" class="box">
|
||||
<div></div>
|
||||
<form><input autocomplete="off" value="Type here..."></input></form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var sockjs_url = '/echo';
|
||||
var sockjs = new SockJS(sockjs_url);
|
||||
$('#first input').focus();
|
||||
|
||||
var div = $('#first div');
|
||||
var inp = $('#first input');
|
||||
var form = $('#first form');
|
||||
|
||||
var print = function(m, p) {
|
||||
p = (p === undefined) ? '' : JSON.stringify(p);
|
||||
div.append($("<code>").text(m + ' ' + p));
|
||||
div.append($("<br>"));
|
||||
div.scrollTop(div.scrollTop()+10000);
|
||||
};
|
||||
|
||||
sockjs.onopen = function() {print('[*] open', sockjs.protocol);};
|
||||
sockjs.onmessage = function(e) {print('[.] message', e.data);};
|
||||
sockjs.onclose = function() {print('[*] close');};
|
||||
|
||||
form.submit(function() {
|
||||
print('[ ] sending', inp.val());
|
||||
sockjs.send(inp.val());
|
||||
inp.val('');
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
</body></html>
|
||||
8
conf/site/node_modules/sockjs/examples/express/package.json
generated
vendored
8
conf/site/node_modules/sockjs/examples/express/package.json
generated
vendored
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"name": "sockjs-express",
|
||||
"version": "0.0.0-unreleasable",
|
||||
"dependencies": {
|
||||
"express": "<3",
|
||||
"sockjs": "*"
|
||||
}
|
||||
}
|
||||
23
conf/site/node_modules/sockjs/examples/express/server.js
generated
vendored
23
conf/site/node_modules/sockjs/examples/express/server.js
generated
vendored
@@ -1,23 +0,0 @@
|
||||
var express = require('express');
|
||||
var sockjs = require('sockjs');
|
||||
|
||||
// 1. Echo sockjs server
|
||||
var sockjs_opts = {sockjs_url: "http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"};
|
||||
|
||||
var sockjs_echo = sockjs.createServer(sockjs_opts);
|
||||
sockjs_echo.on('connection', function(conn) {
|
||||
conn.on('data', function(message) {
|
||||
conn.write(message);
|
||||
});
|
||||
});
|
||||
|
||||
// 2. Express server
|
||||
var app = express.createServer();
|
||||
sockjs_echo.installHandlers(app, {prefix:'/echo'});
|
||||
|
||||
console.log(' [*] Listening on 0.0.0.0:9999' );
|
||||
app.listen(9999, '0.0.0.0');
|
||||
|
||||
app.get('/', function (req, res) {
|
||||
res.sendfile(__dirname + '/index.html');
|
||||
});
|
||||
71
conf/site/node_modules/sockjs/examples/hapi/html/index.html
generated
vendored
71
conf/site/node_modules/sockjs/examples/hapi/html/index.html
generated
vendored
@@ -1,71 +0,0 @@
|
||||
<!doctype html>
|
||||
<html><head>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
||||
<script src="http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"></script>
|
||||
<style>
|
||||
.box {
|
||||
width: 300px;
|
||||
float: left;
|
||||
margin: 0 20px 0 20px;
|
||||
}
|
||||
.box div, .box input {
|
||||
border: 1px solid;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
margin: 5px;
|
||||
}
|
||||
.box div {
|
||||
border-color: grey;
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
.box input {
|
||||
height: 30px;
|
||||
}
|
||||
h1 {
|
||||
margin-left: 30px;
|
||||
}
|
||||
body {
|
||||
background-color: #F0F0F0;
|
||||
font-family: "Arial";
|
||||
}
|
||||
</style>
|
||||
</head><body lang="en">
|
||||
<h1>SockJS Echo example</h1>
|
||||
|
||||
<div id="first" class="box">
|
||||
<div></div>
|
||||
<form><input autocomplete="off" value="Type here..."></input></form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var sockjs_url = '/echo';
|
||||
var sockjs = new SockJS(sockjs_url);
|
||||
$('#first input').focus();
|
||||
|
||||
var div = $('#first div');
|
||||
var inp = $('#first input');
|
||||
var form = $('#first form');
|
||||
|
||||
var print = function(m, p) {
|
||||
p = (p === undefined) ? '' : JSON.stringify(p);
|
||||
div.append($("<code>").text(m + ' ' + p));
|
||||
div.append($("<br>"));
|
||||
div.scrollTop(div.scrollTop()+10000);
|
||||
};
|
||||
|
||||
sockjs.onopen = function() {print('[*] open', sockjs.protocol);};
|
||||
sockjs.onmessage = function(e) {print('[.] message', e.data);};
|
||||
sockjs.onclose = function() {print('[*] close');};
|
||||
|
||||
form.submit(function() {
|
||||
print('[ ] sending', inp.val());
|
||||
sockjs.send(inp.val());
|
||||
inp.val('');
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
</body></html>
|
||||
9
conf/site/node_modules/sockjs/examples/hapi/package.json
generated
vendored
9
conf/site/node_modules/sockjs/examples/hapi/package.json
generated
vendored
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"name": "sockjs-hapi",
|
||||
"version": "0.0.0-unreleasable",
|
||||
"dependencies": {
|
||||
"hapi": "15.x.x",
|
||||
"inert": "4.x.x",
|
||||
"sockjs": "*"
|
||||
}
|
||||
}
|
||||
42
conf/site/node_modules/sockjs/examples/hapi/server.js
generated
vendored
42
conf/site/node_modules/sockjs/examples/hapi/server.js
generated
vendored
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
* Created by Tony on 11/1/13.
|
||||
*/
|
||||
var http = require('http');
|
||||
var sockjs = require('sockjs');
|
||||
var Hapi = require('hapi');
|
||||
|
||||
// 1. Echo sockjs server
|
||||
var sockjs_opts = {
|
||||
sockjs_url: "http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"
|
||||
};
|
||||
|
||||
var sockjs_echo = sockjs.createServer(sockjs_opts);
|
||||
sockjs_echo.on('connection', function(conn) {
|
||||
conn.on('data', function(message) {
|
||||
conn.write(message);
|
||||
});
|
||||
});
|
||||
|
||||
// Create a server and set port (default host 0.0.0.0)
|
||||
var hapi_server = new Hapi.Server();
|
||||
hapi_server.connection({
|
||||
port: 9999
|
||||
});
|
||||
|
||||
hapi_server.register(require('inert'), (err) => {
|
||||
hapi_server.route({
|
||||
method: 'GET',
|
||||
path: '/{path*}',
|
||||
handler: function(request, reply) {
|
||||
reply.file('./html/index.html');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//hapi_server.listener is the http listener hapi uses
|
||||
sockjs_echo.installHandlers(hapi_server.listener, {
|
||||
prefix: '/echo'
|
||||
});
|
||||
|
||||
console.log(' [*] Listening on 0.0.0.0:9999');
|
||||
hapi_server.start();
|
||||
42
conf/site/node_modules/sockjs/examples/haproxy.cfg
generated
vendored
42
conf/site/node_modules/sockjs/examples/haproxy.cfg
generated
vendored
@@ -1,42 +0,0 @@
|
||||
# Requires recent Haproxy to work with websockets (for example 1.4.16).
|
||||
defaults
|
||||
mode http
|
||||
# Set timeouts to your needs
|
||||
timeout client 5s
|
||||
timeout connect 5s
|
||||
timeout server 5s
|
||||
|
||||
frontend all 0.0.0.0:8888
|
||||
mode http
|
||||
timeout client 120s
|
||||
|
||||
option forwardfor
|
||||
# Fake connection:close, required in this setup.
|
||||
option http-server-close
|
||||
option http-pretend-keepalive
|
||||
|
||||
acl is_sockjs path_beg /echo /broadcast /close
|
||||
acl is_stats path_beg /stats
|
||||
|
||||
use_backend sockjs if is_sockjs
|
||||
use_backend stats if is_stats
|
||||
default_backend static
|
||||
|
||||
|
||||
backend sockjs
|
||||
# Load-balance according to hash created from first two
|
||||
# directories in url path. For example requests going to /1/
|
||||
# should be handled by single server (assuming resource prefix is
|
||||
# one-level deep, like "/echo").
|
||||
balance uri depth 2
|
||||
timeout server 120s
|
||||
server srv_sockjs1 127.0.0.1:9999
|
||||
# server srv_sockjs2 127.0.0.1:9998
|
||||
|
||||
backend static
|
||||
balance roundrobin
|
||||
server srv_static 127.0.0.1:8000
|
||||
|
||||
backend stats
|
||||
stats uri /stats
|
||||
stats enable
|
||||
71
conf/site/node_modules/sockjs/examples/koa/index.html
generated
vendored
71
conf/site/node_modules/sockjs/examples/koa/index.html
generated
vendored
@@ -1,71 +0,0 @@
|
||||
<!doctype html>
|
||||
<html><head>
|
||||
<script src="//cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"></script>
|
||||
<style>
|
||||
.box {
|
||||
width: 300px;
|
||||
float: left;
|
||||
margin: 0 20px 0 20px;
|
||||
}
|
||||
.box div, .box input {
|
||||
border: 1px solid;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
margin: 5px;
|
||||
}
|
||||
.box div {
|
||||
border-color: grey;
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
.box input {
|
||||
height: 30px;
|
||||
}
|
||||
h1 {
|
||||
margin-left: 30px;
|
||||
}
|
||||
body {
|
||||
background-color: #F0F0F0;
|
||||
font-family: "Arial";
|
||||
}
|
||||
</style>
|
||||
</head><body lang="en">
|
||||
<h1>SockJS Express example</h1>
|
||||
|
||||
<div id="first" class="box">
|
||||
<div></div>
|
||||
<form><input autocomplete="off" value="Type here..."></input></form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var sockjs_url = '/echo';
|
||||
var sockjs = new SockJS(sockjs_url);
|
||||
$('#first input').focus();
|
||||
|
||||
var div = $('#first div');
|
||||
var inp = $('#first input');
|
||||
var form = $('#first form');
|
||||
|
||||
var print = function(m, p) {
|
||||
p = (p === undefined) ? '' : JSON.stringify(p);
|
||||
div.append($("<code>").text(m + ' ' + p));
|
||||
div.append($("<br>"));
|
||||
div.scrollTop(div.scrollTop()+10000);
|
||||
};
|
||||
|
||||
sockjs.onopen = function() {print('[*] open', sockjs.protocol);};
|
||||
sockjs.onmessage = function(e) {print('[.] message', e.data);};
|
||||
sockjs.onclose = function() {print('[*] close');};
|
||||
|
||||
form.submit(function() {
|
||||
print('[ ] sending', inp.val());
|
||||
sockjs.send(inp.val());
|
||||
inp.val('');
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
</body></html>
|
||||
8
conf/site/node_modules/sockjs/examples/koa/package.json
generated
vendored
8
conf/site/node_modules/sockjs/examples/koa/package.json
generated
vendored
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"name": "sockjs-koa",
|
||||
"version": "0.0.0-unreleasable",
|
||||
"dependencies": {
|
||||
"koa": "^0.21.0",
|
||||
"sockjs": "*"
|
||||
}
|
||||
}
|
||||
29
conf/site/node_modules/sockjs/examples/koa/server.js
generated
vendored
29
conf/site/node_modules/sockjs/examples/koa/server.js
generated
vendored
@@ -1,29 +0,0 @@
|
||||
var koa = require('koa');
|
||||
var sockjs = require('sockjs');
|
||||
var http = require('http');
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
// 1. Echo sockjs server
|
||||
var sockjs_opts = {sockjs_url: "http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"};
|
||||
var sockjs_echo = sockjs.createServer(sockjs_opts);
|
||||
sockjs_echo.on('connection', function(conn) {
|
||||
conn.on('data', function(message) {
|
||||
conn.write(message);
|
||||
});
|
||||
});
|
||||
|
||||
// 2. koa server
|
||||
var app = koa();
|
||||
|
||||
app.use(function *() {
|
||||
var filePath = __dirname + '/index.html';
|
||||
this.type = path.extname(filePath);
|
||||
this.body = fs.createReadStream(filePath);
|
||||
});
|
||||
|
||||
var server = http.createServer(app.callback());
|
||||
sockjs_echo.installHandlers(server, {prefix:'/echo'});
|
||||
|
||||
server.listen(9999, '0.0.0.0');
|
||||
console.log(' [*] Listening on 0.0.0.0:9999' );
|
||||
26
conf/site/node_modules/sockjs/examples/multiplex/README.md
generated
vendored
26
conf/site/node_modules/sockjs/examples/multiplex/README.md
generated
vendored
@@ -1,26 +0,0 @@
|
||||
WebSocket-multiplex SockJS example
|
||||
==================================
|
||||
|
||||
This example is a copy of example from
|
||||
[websocket-multiplex](https://github.com/sockjs/websocket-multiplex/)
|
||||
project:
|
||||
|
||||
* https://github.com/sockjs/websocket-multiplex/
|
||||
|
||||
|
||||
To run this example, first install dependencies:
|
||||
|
||||
npm install
|
||||
|
||||
And run a server:
|
||||
|
||||
node server.js
|
||||
|
||||
|
||||
That will spawn an http server at http://127.0.0.1:9999/ which will
|
||||
serve both html (served from the current directory) and also SockJS
|
||||
service (under the [/multiplex](http://127.0.0.1:9999/multiplex)
|
||||
path).
|
||||
|
||||
With that set up, WebSocket-multiplex is able to push three virtual
|
||||
connections over a single SockJS connection. See the code for details.
|
||||
96
conf/site/node_modules/sockjs/examples/multiplex/index.html
generated
vendored
96
conf/site/node_modules/sockjs/examples/multiplex/index.html
generated
vendored
@@ -1,96 +0,0 @@
|
||||
<!doctype html>
|
||||
<html><head>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
||||
<script src="http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"></script>
|
||||
<script src="http://cdn.sockjs.org/websocket-multiplex-0.1.js"></script>
|
||||
<style>
|
||||
.box {
|
||||
width: 300px;
|
||||
float: left;
|
||||
margin: 0 20px 0 20px;
|
||||
}
|
||||
.box div, .box input {
|
||||
border: 1px solid;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
margin: 5px;
|
||||
}
|
||||
.box div {
|
||||
border-color: grey;
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
}
|
||||
.box input {
|
||||
height: 30px;
|
||||
}
|
||||
h1 {
|
||||
margin-left: 75px;
|
||||
}
|
||||
body {
|
||||
background-color: #F0F0F0;
|
||||
font-family: "Arial";
|
||||
}
|
||||
</style>
|
||||
</head><body lang="en">
|
||||
<h1>SockJS Multiplex example</h1>
|
||||
|
||||
<div id="first" class="box">
|
||||
<div></div>
|
||||
<form><input autocomplete="off" value="Type here..."></input></form>
|
||||
</div>
|
||||
|
||||
<div id="second" class="box">
|
||||
<div></div>
|
||||
<form><input autocomplete="off"></input></form>
|
||||
</div>
|
||||
|
||||
<div id="third" class="box">
|
||||
<div></div>
|
||||
<form><input autocomplete="off"></input></form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Pipe - convenience wrapper to present data received from an
|
||||
// object supporting WebSocket API in an html element. And the other
|
||||
// direction: data typed into an input box shall be sent back.
|
||||
var pipe = function(ws, el_name) {
|
||||
var div = $(el_name + ' div');
|
||||
var inp = $(el_name + ' input');
|
||||
var form = $(el_name + ' form');
|
||||
|
||||
var print = function(m, p) {
|
||||
p = (p === undefined) ? '' : JSON.stringify(p);
|
||||
div.append($("<code>").text(m + ' ' + p));
|
||||
div.append($("<br>"));
|
||||
div.scrollTop(div.scrollTop() + 10000);
|
||||
};
|
||||
|
||||
ws.onopen = function() {print('[*] open', ws.protocol);};
|
||||
ws.onmessage = function(e) {print('[.] message', e.data);};
|
||||
ws.onclose = function() {print('[*] close');};
|
||||
|
||||
form.submit(function() {
|
||||
print('[ ] sending', inp.val());
|
||||
ws.send(inp.val());
|
||||
inp.val('');
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
var sockjs_url = '/multiplex';
|
||||
var sockjs = new SockJS(sockjs_url);
|
||||
|
||||
var multiplexer = new WebSocketMultiplex(sockjs);
|
||||
var ann = multiplexer.channel('ann');
|
||||
var bob = multiplexer.channel('bob');
|
||||
var carl = multiplexer.channel('carl');
|
||||
|
||||
pipe(ann, '#first');
|
||||
pipe(bob, '#second');
|
||||
pipe(carl, '#third');
|
||||
|
||||
$('#first input').focus();
|
||||
</script>
|
||||
</body></html>
|
||||
9
conf/site/node_modules/sockjs/examples/multiplex/package.json
generated
vendored
9
conf/site/node_modules/sockjs/examples/multiplex/package.json
generated
vendored
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"name": "sockjs-multiplex",
|
||||
"version": "0.0.0-unreleasable",
|
||||
"dependencies": {
|
||||
"express": "2.5.8",
|
||||
"sockjs": "*",
|
||||
"websocket-multiplex" : "0.1.x"
|
||||
}
|
||||
}
|
||||
52
conf/site/node_modules/sockjs/examples/multiplex/server.js
generated
vendored
52
conf/site/node_modules/sockjs/examples/multiplex/server.js
generated
vendored
@@ -1,52 +0,0 @@
|
||||
var express = require('express');
|
||||
var sockjs = require('sockjs');
|
||||
|
||||
var websocket_multiplex = require('websocket-multiplex');
|
||||
|
||||
|
||||
// 1. Setup SockJS server
|
||||
var sockjs_opts = {sockjs_url: "http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js"};
|
||||
var service = sockjs.createServer(sockjs_opts);
|
||||
|
||||
|
||||
// 2. Setup multiplexing
|
||||
var multiplexer = new websocket_multiplex.MultiplexServer(service);
|
||||
|
||||
var ann = multiplexer.registerChannel('ann');
|
||||
ann.on('connection', function(conn) {
|
||||
conn.write('Ann says hi!');
|
||||
conn.on('data', function(data) {
|
||||
conn.write('Ann nods: ' + data);
|
||||
});
|
||||
});
|
||||
|
||||
var bob = multiplexer.registerChannel('bob');
|
||||
bob.on('connection', function(conn) {
|
||||
conn.write('Bob doesn\'t agree.');
|
||||
conn.on('data', function(data) {
|
||||
conn.write('Bob says no to: ' + data);
|
||||
});
|
||||
});
|
||||
|
||||
var carl = multiplexer.registerChannel('carl');
|
||||
carl.on('connection', function(conn) {
|
||||
conn.write('Carl says goodbye!');
|
||||
// Explicitly cancel connection
|
||||
conn.end();
|
||||
});
|
||||
|
||||
|
||||
// 3. Express server
|
||||
var app = express.createServer();
|
||||
service.installHandlers(app, {prefix:'/multiplex'});
|
||||
|
||||
console.log(' [*] Listening on 0.0.0.0:9999' );
|
||||
app.listen(9999, '0.0.0.0');
|
||||
|
||||
app.get('/', function (req, res) {
|
||||
res.sendfile(__dirname + '/index.html');
|
||||
});
|
||||
|
||||
app.get('/multiplex.js', function (req, res) {
|
||||
res.sendfile(__dirname + '/multiplex.js');
|
||||
});
|
||||
2
conf/site/node_modules/sockjs/lib/sockjs.js
generated
vendored
2
conf/site/node_modules/sockjs/lib/sockjs.js
generated
vendored
@@ -178,7 +178,7 @@
|
||||
log: function(severity, line) {
|
||||
return console.log(line);
|
||||
},
|
||||
sockjs_url: 'https://cdn.jsdelivr.net/sockjs/1/sockjs.min.js'
|
||||
sockjs_url: 'https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js'
|
||||
};
|
||||
if (user_options) {
|
||||
utils.objectExtend(this.options, user_options);
|
||||
|
||||
7
conf/site/node_modules/sockjs/lib/webjs.js
generated
vendored
7
conf/site/node_modules/sockjs/lib/webjs.js
generated
vendored
@@ -57,12 +57,7 @@
|
||||
}
|
||||
r = r.concat(['', '']);
|
||||
try {
|
||||
res.write(r.join('\r\n'));
|
||||
} catch (error1) {
|
||||
x = error1;
|
||||
}
|
||||
try {
|
||||
return res.end();
|
||||
return res.write(r.join('\r\n'));
|
||||
} catch (error1) {
|
||||
x = error1;
|
||||
}
|
||||
|
||||
25
conf/site/node_modules/sockjs/package.json
generated
vendored
25
conf/site/node_modules/sockjs/package.json
generated
vendored
@@ -1,32 +1,32 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"sockjs@0.3.19",
|
||||
"sockjs@0.3.20",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "sockjs@0.3.19",
|
||||
"_id": "sockjs@0.3.19",
|
||||
"_from": "sockjs@0.3.20",
|
||||
"_id": "sockjs@0.3.20",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==",
|
||||
"_integrity": "sha512-SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA==",
|
||||
"_location": "/sockjs",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "sockjs@0.3.19",
|
||||
"raw": "sockjs@0.3.20",
|
||||
"name": "sockjs",
|
||||
"escapedName": "sockjs",
|
||||
"rawSpec": "0.3.19",
|
||||
"rawSpec": "0.3.20",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.3.19"
|
||||
"fetchSpec": "0.3.20"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/webpack-dev-server"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz",
|
||||
"_spec": "0.3.19",
|
||||
"_resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.20.tgz",
|
||||
"_spec": "0.3.20",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "Marek Majkowski"
|
||||
@@ -46,11 +46,12 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"faye-websocket": "^0.10.0",
|
||||
"uuid": "^3.0.1"
|
||||
"uuid": "^3.4.0",
|
||||
"websocket-driver": "0.6.5"
|
||||
},
|
||||
"description": "SockJS-node is a server counterpart of SockJS-client a JavaScript library that provides a WebSocket-like object in the browser. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.",
|
||||
"devDependencies": {
|
||||
"coffee-script": "^1.8.0"
|
||||
"coffeescript": "^1.12.7"
|
||||
},
|
||||
"homepage": "https://github.com/sockjs/sockjs-node",
|
||||
"keywords": [
|
||||
@@ -69,5 +70,5 @@
|
||||
"postversion": "npm publish",
|
||||
"version": "make build && git add Changelog"
|
||||
},
|
||||
"version": "0.3.19"
|
||||
"version": "0.3.20"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user