First try at app.js solution
Think I got it working...