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
// $ node queue <file name or youtube URL> | |
const net = require('net') | |
let client = net.connect(1234, 'localhost') | |
client.on('connect', function () { | |
if (process.argv[2]) { | |
console.log('Queueing ' + process.argv[2]) | |
client.write('queue.push smart:' + process.argv[2] + '\r\n') | |
} |