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
// gopher.js - a minimal gopher implementation using node.js | |
// Released under the 3 clause BSD license by Matt Croydon <mcroydon@gmail.com> (http://postneo.com) | |
var net = require('net'); | |
net.createServer(function (socket) { | |
socket.setEncoding("ascii"); | |
socket.on("data", function (data) { | |
if (data === '\r\n') { | |
console.log('Serving index.'); |
NewerOlder