Closed easingthemes closed 6 years ago
When using ssl default http://localhost:3001 is opened.
ssl
http://localhost:3001
Currently default options are:
urlBase: 'http://localhost:3001', port: 3001, open: true,
If you want to use ssl than https module is used:
https
if (this.options.privateKey && this.options.certificate) { this.server = https.createServer({
urlBase
http
if (options.open) { open(options.urlBase + options.uiPath); }
Maybe urlBase can be split into protocol, domain and port as configurable options:
const options = { ... domain: 'localhost', port: 3001, protocol: 'http' ... }
and than create urlBase from options:
const { protocol, domain, port, urlBase = `${protocol}://${domain}:${port}` } = options;
Simple solution is to use urlBase as https://localhost:3001, so I'm not sure if this is worth implementing or it's quite enough to add this info in readme.
https://localhost:3001
readme
What do you think?
Your approach is a possible solution but the idea behind baseUrl is to be flexible in case of you are using a host, vm or an docker container.
When using
ssl
defaulthttp://localhost:3001
is opened.Currently default options are:
If you want to use
ssl
thanhttps
module is used:urlBase
still hashttp
protocol and that is opened as default:urlBase
stays the same, although I've never saw any issues with this.Maybe
urlBase
can be split into protocol, domain and port as configurable options:and than create
urlBase
from options:Simple solution is to use
urlBase
ashttps://localhost:3001
, so I'm not sure if this is worth implementing or it's quite enough to add this info inreadme
.What do you think?