Updated app.js file