Simple script to stream a file from Node.js to Icecast (or any libshout
compatible server) using nodeshout.
const shout = ... // Shout instance
const songPath = 'song.ogg';
const playing = play(shout, songPath);
playing.on("finish", ()=>{
// Do something (e.g.: play next song)
});
playing.on("error", (error)=>{
// An error happened, oh no
console.warn(error);
});