Merge pull request #1068 from embark-framework/bugfix/no-webserver-no-url

fix: do not display log if no webserver
This commit is contained in:
Anthony Laibe 2018-11-13 09:13:01 +00:00 committed by GitHub
commit c8d6f18648
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,9 +72,12 @@ class Authenticator {
let self = this; let self = this;
this.events.once('outputDone', () => { this.events.once('outputDone', () => {
const {port, host} = this.embark.config.webServerConfig; const {port, host, enabled} = this.embark.config.webServerConfig;
this.logger.info(__('Access the web backend with the following url: %s',
(`http://${host}:${port}/embark?token=${this.authToken}`.underline))); if (enabled) {
this.logger.info(__('Access the web backend with the following url: %s',
(`http://${host}:${port}/embark?token=${this.authToken}`.underline)));
}
}); });
this.events.setCommandHandler('authenticator:authorize', (req, res, cb) => { this.events.setCommandHandler('authenticator:authorize', (req, res, cb) => {