Closed mmacata closed 3 years ago
There are two different types of "urls" you can set here:
publicPath
/ CLIENT_URL
as env. var.: This is the path where the editor will be deployed.
Examples:
https://editor.openeo.org/
needs the publicPath to be /
https://editor.openeo.org/somewhere/else/
needs the publicPath to be /somewhere/else/
serverUrl
: This can optionally be set to connect to a back-end automatically when opening the Web Editor, so you could set this to https://openeo.mundialis.de
and then the Web Editor connect to your back-end automatically.Does this help? I'll try to improve the docs a bit, too...
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?
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.
Ok thank you!
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!