Updated app.js from docs