mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Consistent event names
no issue - rename event to `server.stop` - rename event to `server.start` - we are using the dot notation
This commit is contained in:
parent
63642fd8ad
commit
b2a8165d01
4 changed files with 5 additions and 5 deletions
|
@ -94,7 +94,7 @@ GhostServer.prototype.start = function (externalApp) {
|
||||||
self.httpServer.on('connection', self.connection.bind(self));
|
self.httpServer.on('connection', self.connection.bind(self));
|
||||||
self.httpServer.on('listening', function () {
|
self.httpServer.on('listening', function () {
|
||||||
debug('...Started');
|
debug('...Started');
|
||||||
common.events.emit('server:start');
|
common.events.emit('server.start');
|
||||||
self.logStartMessages();
|
self.logStartMessages();
|
||||||
resolve(self);
|
resolve(self);
|
||||||
});
|
});
|
||||||
|
@ -115,7 +115,7 @@ GhostServer.prototype.stop = function () {
|
||||||
resolve(self);
|
resolve(self);
|
||||||
} else {
|
} else {
|
||||||
self.httpServer.close(function () {
|
self.httpServer.close(function () {
|
||||||
common.events.emit('server:stop');
|
common.events.emit('server.stop');
|
||||||
self.httpServer = null;
|
self.httpServer = null;
|
||||||
self.logShutdownMessages();
|
self.logShutdownMessages();
|
||||||
resolve(self);
|
resolve(self);
|
||||||
|
|
|
@ -19,7 +19,7 @@ module.exports = {
|
||||||
debug('init themes', activeThemeName);
|
debug('init themes', activeThemeName);
|
||||||
|
|
||||||
// Register a listener for server-start to load all themes
|
// Register a listener for server-start to load all themes
|
||||||
common.events.on('server:start', function readAllThemesOnServerStart() {
|
common.events.on('server.start', function readAllThemesOnServerStart() {
|
||||||
themeLoader.loadAllThemes();
|
themeLoader.loadAllThemes();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ class UrlService {
|
||||||
UrlService.cacheRoute('/subscribe/', {});
|
UrlService.cacheRoute('/subscribe/', {});
|
||||||
|
|
||||||
// Register a listener for server-start to load all the known urls
|
// Register a listener for server-start to load all the known urls
|
||||||
common.events.on('server:start', (() => {
|
common.events.on('server.start', (() => {
|
||||||
debug('URL service, loading all URLS');
|
debug('URL service, loading all URLS');
|
||||||
this.loadResourceUrls();
|
this.loadResourceUrls();
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -933,7 +933,7 @@ startGhost = function startGhost(options) {
|
||||||
.then(function () {
|
.then(function () {
|
||||||
customRedirectsMiddleware.reload();
|
customRedirectsMiddleware.reload();
|
||||||
|
|
||||||
common.events.emit('server:start');
|
common.events.emit('server.start');
|
||||||
return ghostServer;
|
return ghostServer;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue