Skip to content

Instantly share code, notes, and snippets.

@monkeym4ster
Created March 21, 2016 07:50
Show Gist options
  • Save monkeym4ster/50e936b40fc579017956 to your computer and use it in GitHub Desktop.
Save monkeym4ster/50e936b40fc579017956 to your computer and use it in GitHub Desktop.
Read File Stream Line-by-Line
readline = require('readline')
fs = require('fs')
rl = readline.createInterface(
input: fs.createReadStream('sample.txt')
)
rl.on 'line', (line) ->
console.log 'Line from file:', line
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment