Last active
December 11, 2018 11:11
-
-
Save SamDecrock/941fe7cd592bb97bc7593c8df23f4c13 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
// this one liner starts a TCP server on port 3000 and spits out all the data it receives | |
// just run `node` from the command line and past the following: | |
require('net').createServer(function(socket) { socket.on('data', function(data) { console.log(data.toString()) }); }).listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment