Question

When deploying a droplet, does a digital ocean droplet allow direct socket access?

Posted November 6, 2016 1.1k views
ApacheUbuntu 16.04

I am trying to deploy a web application that allows access to sockets.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

i’ve had no difficulty running a node.js application that uses sockets (with the socket.io library).

EXAMPLE:

var iohost = require(‘socket.io’).listen(3000).on('connection’,function(sock){
sock.on('client’,function(data){
sock.broadcast.emit('foo’,{'foobar’: data.letter});
});
});

Submit an Answer