Pass app in promise