spotify in your node.js app

var spotify = require('spotify')({ appkeyFile: 'spotify_appkeyFile.key' });
var ready = function()  {
    var starredPlaylist = spotify.sessionUser.starredPlaylist;
    spotify.player.play(starredPlaylist.getTrack(0));
};
spotify.on({
    ready: ready
});
spotify.login('user', 'password', false, false);

Great, what do i need?

To use node-spotify you need

Download

I provide precompiled binaries if you don't want to / cannot compile if installing via npm. Just unzip the file and copy the contents to the node_modules directory.

Current version: v0.7.0. Changelog

With native audio

Without native audio

You have to call spotify.useNodejsAudio(callback) if you want the player to work. See documentation

Source Code

The source code is available at github

Have a look at the programmers section too!