aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources/assets/js/chatServer.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/assets/js/chatServer.js')
-rwxr-xr-xresources/assets/js/chatServer.js26
1 files changed, 0 insertions, 26 deletions
diff --git a/resources/assets/js/chatServer.js b/resources/assets/js/chatServer.js
deleted file mode 100755
index fb6c7fc..0000000
--- a/resources/assets/js/chatServer.js
+++ /dev/null
@@ -1,26 +0,0 @@
-var app = require('express')();
-var server = require('http').Server(app);
-var io = require('socket.io')(server);
-var redis = require('redis');
-var port = 8890;
-
-server.listen(port, function () {
- console.log("Listening on " + port)
-});
-
-io.on('connection', function (socket) {
-
- console.log("new client connected");
- var redisClient = redis.createClient();
- redisClient.subscribe('message');
-
- redisClient.on("message", function (channel, message) {
- console.log("new message" + message);
- socket.emit(channel, message);
- });
-
- socket.on('disconnect', function () {
- console.log("client connected");
- redisClient.quit();
- });
-});