razorframe
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -6,3 +6,2 @@ const { EventEmitter } = require('events'); | ||
const redis = require('redis'); | ||
// const socket = require('socket.io'); | ||
const redisAdapter = require('socket.io-redis'); | ||
@@ -13,2 +12,4 @@ const sticky = require('sticky-session'); | ||
/**Razorframe constructor | ||
@@ -61,2 +62,4 @@ * | ||
// Master code | ||
io.adapter(redisAdapter(`redis://rediscloud:M2mqcriGrEZk8vEy@redis-10941.c11.us-east-1-2.ec2.cloud.redislabs.com:10941`)); | ||
http.once('listening', function () { | ||
@@ -67,3 +70,2 @@ console.log('server started on 3000 port'); | ||
// Worker code | ||
handleSockets(config); | ||
@@ -88,6 +90,5 @@ } | ||
const { write, show } = config; | ||
io.adapter(redisAdapter('redis://h:paffabe4f99b3fc3313647c6bc62a7af5cdca6acd41a538bb3999ac40d90e50d2@ec2-184-72-246-90.compute-1.amazonaws.com:13119')); | ||
io.on('connection', (socket) => { | ||
@@ -97,3 +98,5 @@ console.log('a user connected! 💃'); | ||
socket.on('disconnect', () => console.log('user disconnected!')); | ||
socket.on('disconnect', function () { | ||
console.log(socket.id + ' disconnect (' + socket.client.conn.transport.constructor.name + ')'); | ||
}); | ||
@@ -100,0 +103,0 @@ // Client listeners |
{ | ||
"name": "razorframe", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Empowering real-time databases in Node.js", | ||
@@ -5,0 +5,0 @@ "main": "./lib/Razorframe.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9105
134