Created
May 10, 2017 18:44
-
-
Save miguelmota/67f4e38317f928bf32c0b847e3f9cae2 to your computer and use it in GitHub Desktop.
Node.js tail command
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
const {spawn} = require('child_process') | |
const proc = spawn('tail', ['-f', 'events.log']) | |
proc.stdout.on('data', data => { | |
process.stdout.write(data) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment