Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var app = require('express')(),
server = require('http').Server(app),
io = require('socket.io')(server),
cote = require('cote');
app.get('/', function (req, res) {
console.log(`${req.ip} requested end-user interface`);
res.sendFile(__dirname + '/index.html');
});
server.listen(5001);
new cote.Sockend(io, {
name: 'end-user sockend server'
});
namespace: 'product'
});
var userRequester = new cote.Requester({
name: 'admin user requester',
namespace: 'user'
});
var purchaseRequester = new cote.Requester({
name: 'admin purchase requester',
namespace: 'purchase'
});
server.listen(5000);
new cote.Sockend(io, {
name: 'admin sockend server'
});