Skip to content

Instantly share code, notes, and snippets.

@brunops
Created April 28, 2014 23:14
Show Gist options
  • Save brunops/11386743 to your computer and use it in GitHub Desktop.
Save brunops/11386743 to your computer and use it in GitHub Desktop.
var net = require('net');
var server = net.Server();
var port = process.env.PORT || 1337;
server.listen(port);
server.on('connection', function (socket) {
socket.write('hello');
});
console.log("listening on: " + port);
// used many different combinations to connect, but basically:
// telnet node-chat-server-bla.herokuapp.com 80
// tried the actual port the server started (by checking "heroku logs") as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment