1
0
goodtimes/server/basepath.js
James Ketrenos c7435c4bb1 eslinted everything and moved db around
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
2022-04-07 14:25:20 -07:00

10 lines
236 B
JavaScript
Executable File

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