Open-EO / openeo-web-editor

An interactive and easy to use web-based editor for the OpenEO API.
https://editor.openeo.org
Apache License 2.0
12 stars 17 forks source link

Configuration question about CLIENT_URL #168

Closed mmacata closed 3 years ago

mmacata commented 3 years ago

Besides the config.js, there is vue.config.js. It has a parameter publicPath: process.env.CLIENT_URL || '/',.

Do I understand it correctly, that to change it, it is sufficient to set CLIENT_URL as environment variable? And when I use the production build, where all sources are static and relative to each other - are there any benefits why it should be set and not empty?

Thank you for clarification!

m-mohr commented 3 years ago

There are two different types of "urls" you can set here:

Does this help? I'll try to improve the docs a bit, too...

mmacata commented 3 years ago

The config.js -> serverUrl is explained well enough from my point of view. For the vue.config.js -> publicPath / CLIENT_URL I now understand publicPath better.

Still I have the question for CLIENT_URL as env var. Do I need to set this? Can it be empty? In the example above, does it need to be https://editor.openeo.org/ ? Locally everything starts fine without setting it. But I haven't tested everything to be sure it really can be empty? And when it can be empty - what would be the benefits of setting it?

m-mohr commented 3 years ago

You don't need to provide it if you deploy the Web Editor at the root of the host/domain, otherwise you need to provide the path, but you can also simply change it in the vue.config.js file, see the examples above. You don't provide the domain/protocol, just the path.

mmacata commented 3 years ago

Ok thank you!