I am developing a Google App Engine application with several modules. Back-end APIs use Google Cloud endpoints. When I start the GAE server locally, even if I load the API from my admin module (localhost: 9090) after loading the client, it tries to make calls to the default module port (localhost: 8080). Everything works fine on the remote GAE instance. What could be the reason or a workaround for this?
The code:
function init() {
var loadCallback = function () {
gapi.client.adminapi.mymethod(12345).then(alert(Woohoo!));
};
var apiRoot = '//' + window.location.host + '/_ah/api';
gapi.client.load('adminapi', 'v1', loadCallback, apiRoot);
}
source
share