add promise into app.js