1
0
ketr.chat/server/lib/basepath.js
James Ketrenos 29de35b17f Builds with TypeScript enabled
Signed-off-by: James Ketrenos <james@ketrenos.com>
2023-03-30 16:14:27 -07:00

11 lines
250 B
JavaScript
Executable File

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