mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
move reporting to final callback
This commit is contained in:
parent
b67aa8cc2d
commit
d4be16ba3c
@ -48,13 +48,19 @@ class Server {
|
||||
if (self.opened) {
|
||||
return next();
|
||||
}
|
||||
function reportAvailable(next) {
|
||||
next(null, __("webserver available at") +
|
||||
" " +
|
||||
("http://" + canonicalHost(self.hostname) +
|
||||
":" + self.port).bold.underline.green, self.port);
|
||||
self.opened = true;
|
||||
self.events.request('open-browser', next);
|
||||
}
|
||||
], callback);
|
||||
], function (err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
const msg = (
|
||||
__('webserver available at') + ' ' +
|
||||
('http://' + canonicalHost(self.hostname) + ':' + self.port).bold.underline.green
|
||||
);
|
||||
callback(null, msg, self.port);
|
||||
});
|
||||
}
|
||||
|
||||
stop(callback) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user