mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-25 21:18:51 +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) {
|
if (self.opened) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
function reportAvailable(next) {
|
self.opened = true;
|
||||||
next(null, __("webserver available at") +
|
self.events.request('open-browser', next);
|
||||||
" " +
|
|
||||||
("http://" + canonicalHost(self.hostname) +
|
|
||||||
":" + self.port).bold.underline.green, self.port);
|
|
||||||
}
|
}
|
||||||
], 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) {
|
stop(callback) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user