Fix services.js in order to work in localhost and in cloudbees