Skip to content

Instantly share code, notes, and snippets.

@guyromm
Created December 10, 2014 14:45
Show Gist options
  • Save guyromm/149df22f922c2fc9db97 to your computer and use it in GitHub Desktop.
Save guyromm/149df22f922c2fc9db97 to your computer and use it in GitHub Desktop.
#!/usr/bin/env coffee
http = require 'http'
fs = require 'fs'
oppressor = require 'oppressor'
Readable = require 'stream'
.Readable
server = http.createServer (req,res) =>
stream = fs.createReadStream __dirname+'/node_modules/coffee-script/lib/coffee-script/parser.js'
stream.pipe oppressor req
.pipe res
c = 97;
rs = new Readable
rs._read = ->
rs.push String.fromCharCode c++
if c > 'z'.charCodeAt 0 then rs.push null
rs.pipe process.stdout
server.listen 8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment