finos/legend-pure

Legend Light IDE's PURE URL is ignored

Opened this issue · 0 comments

gbrgr commented

Support Question

The light server cannot be accessed from the Light IDE in its current version.

In the current iteration of the Light IDE, starting the IDE locally with a version of the Light server running in the background yields the message that /initialize cannot be found. Browser debug logs show that the IDE is trying to GET localhost:3000/initialize, where instead it should GET localhost:9010/initialize, which is the default port for the light server.

This is due to the following line in EditorStore.tsx:

    this.client = new PureClient(
      new NetworkClient({
        // NOTE: ignore the URL specified in the config so we can use this client for both Pure and Engine
        baseUrl: window.location.origin,
      }),
    );

The following fix works:

    this.client = new PureClient(
      new NetworkClient({
        // NOTE: ignore the URL specified in the config so we can use this client for both Pure and Engine
        baseUrl: this.applicationStore.config.pureUrl,
      }),
    );

I see that there is a NOTE remarking that the use of the window origin is intentional to support both PURE and the engine. So how does one run the Light IDE plus the IDE server locally?