1.0.0 • Published 8 years ago

mpdlib v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

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"
    });
});