Files
mykb/util/basePath.js
2018-05-17 14:31:05 -05:00

8 lines
245 B
JavaScript

// make sure basePath doesn't end with /
let { basePath } = require('../config/host.json');
const urlChars = basePath.split('');
if(basePath.length > 1 && urlChars.pop() === '/') {
basePath = urlChars.join('');
}
module.exports = basePath;