updated app.js for web run