format the app.js code