18 lines
343 B
Plaintext
18 lines
343 B
Plaintext
|
#!/usr/bin/env node
|
||
|
'use strict'
|
||
|
const net = require('net')
|
||
|
const path = require('path')
|
||
|
|
||
|
let client = net.connect('7004', '127.0.0.1')
|
||
|
|
||
|
client.pipe(process.stdout)
|
||
|
|
||
|
client.once('connect', function () {
|
||
|
if (process.argv[2]) {
|
||
|
client.write('queue.push smart:' + process.argv[2] + '\r\n')
|
||
|
}
|
||
|
client.write('quit\r\n')
|
||
|
client.end()
|
||
|
})
|
||
|
|