0

My scenario is following: I have server running on one port lets say 58920 - this is my frontEndServer Then i have deployd running on other port 2403.

Then i copy the dpd.js file (localhost:2403/dpd.js) to my frontEndServer file system so i can use it.

http://docs.deployd.com/docs/collections/reference/dpd-js.html

The problem is when i call some on my frontEndServer for example login: POST http://localhost:58920/FirstApp/api/users/login 404 (Not Found)

because the server is hosted on :2403.

My question is: How can i change the port in generated dpd.js file?

Remiwaw
  • 163
  • 2
  • 13

1 Answers1

0

Nvm i found it:

dpd.setBaseUrl({protocol : 'http:', hostname : 'localhost', port : '2403'});

https://www.bountysource.com/issues/6881984-feature-dpd-script-can-change-its-url-base

 function setupBaseUrl(options) {
    options = options || {};
    if (typeof options === "string") {
      root = options;
      return;
    }

    var protocol = options.protocol || window.location.protocol;
    var hostname = options.hostname || window.location.hostname;
    var port = options.port || window.location.port;

    root = protocol + '//' + hostname;
    if (port !== '') {
      root += ':' + port;
    }
  }
Remiwaw
  • 163
  • 2
  • 13