Closed trajano closed 1 year ago
Just tried to do it myself, failed miserably :P I am no nodeJS express dev that's for sure:
I started with
/**
* The context root of the web application.
* @type {string}
*/
const contextRoot = process.env.CTX_ROOT || "/";
But I can't seem to figure out how to link
const router = express.Router()
app.use(contextRoot, router)
with the new path.
I just added this feature with env var PATH_PREFIX
.
Could you check it?
Docker image: mohsenasm/swarm-dashboard:dev_path_prefix
Yup looks good. I was reading up on how to code in elm for this last bit to get the variable
localWebsocket location =
if location.protocol == "https:" then
"wss://" ++ location.host ++ "/stream"
else
"ws://" ++ location.host ++ "/stream"
But you beat me to it :D
I also verified that it is using the proper paths to in the dev tools
So can we have a v2.1
soon?
Yeah, v2.1
is available now.
Can you make it so it works with a different context root e.g.
https://mysserver.com/swarm-dashboard
like theCTX_ROOT
variable of swarm visualizer?I think this may be the solution