npm.io
1.0.0 • Published 10 years ago

mpdlib

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0

mpdlib

A bit of an experiment in using es6 class/promises to interact with the mpd protocol

usage

requires node v5.0.0+

const mpdConnection = require('mpdlib');
const port = process.env.MPD_PORT || 6600;
const host = process.env.MPD_HOST || 'localhost';
const password = 'topsecretmusicpassword'

mpdConnection(host, port, password).then(conn => {
    conn.command('listall').then(res => {
        console.log(d.toString()); // "OK"
    });
});