Files
mykb/util/basePath.js
2018-06-01 16:52:12 -05:00

9 lines
240 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