Created
December 10, 2014 14:45
-
-
Save guyromm/149df22f922c2fc9db97 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/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