const config = require("config"); let basePath = config.get("basePath"); basePath = "/" + basePath.replace(/^\/+/, "").replace(/\/+$/, "") + "/"; if (basePath == "//") { basePath = "/"; } console.log(`Using basepath ${basePath}`); module.exports = basePath;