Fixed  for promises
Renamed server.js to db.App