let basePath = process.env.CHAT_BASE; console.log(basePath); basePath = "/" + basePath.replace(/^\/+/, "").replace(/\/+$/, "") + "/"; if (basePath == "//") { basePath = "/"; } console.log(`Using basepath ${basePath}`); module.exports = basePath;