This will be available in 1.18.4 https://github.com/NodeBB/NodeBB/issues/9845
Im currently using the bellow but it seems that .url is not verry reliable as even if the user dosent set it correctly the site just works anyway. Does Nodebb have a function somewhere i cant find?
var siteConfig = module.parent.require('../config.json'); siteConfig.url
You can use the
nconfdependency (to be listed as
var nconf = require("nconf"); nconf.get("url")
However, it's just as unreliable; There is no current solution to save the user from mis-configured
urlproperty. I get issues/questions regarding this on a regular basis.