using pathPrefix, renamed basePath to prefixPath, updated how getUrl gets the prefixPath to prevent the need for rebuilding when its changed now just requires restart
9 lines
250 B
JavaScript
9 lines
250 B
JavaScript
// make sure basePath doesn't end with /
|
|
let { pathPrefix } = require('../config/host.json')
|
|
const urlChars = pathPrefix.split('')
|
|
|
|
if (pathPrefix.length > 1 && urlChars.pop() === '/') {
|
|
pathPrefix = urlChars.join('')
|
|
}
|
|
module.exports = pathPrefix
|