Open jaumard opened 8 years ago
Yea I think we could set this in config.web
. There's no "standard" right now, but I think baseUrl
makes sense. Various trailpacks already use hostname
and port
in config.web
Yeah I think it's better to avoid using host and port directly because how trailpack can detect SSL option ? Because host normally doesn't contains http(s). It will depends of the web server... If there a config.web.baseUrl user can set it with http/https if they want to.
Like this no problems with Trailpack that don't detect baseUrl correctly. Trails (or trailpack-core or each webserver trailpack ?) should set config.web.baseUrl
to 'http://' + config.web.host + ':' + config.web.port
by default.
Trailpacks sometimes need to have access to the app url (for email url or url callbacks for example).
Maybe we can simply add a
config.main.appUrl
who is by default set to'http://' + config.web.host + ':' + config.web.port
and users can override it undermain.js
.Like this trailpacks who need app url can always use
config.main.appUrl
instead of each one try to guess what it is...related to https://github.com/trailsjs/trails/issues/104