Created
April 28, 2014 23:14
-
-
Save brunops/11386743 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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