Update app.js

move serverside service