0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -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:
kirrg001 2018-04-15 23:48:48 +02:00
parent 63642fd8ad
commit b2a8165d01
4 changed files with 5 additions and 5 deletions

View file

@ -94,7 +94,7 @@ GhostServer.prototype.start = function (externalApp) {
self.httpServer.on('connection', self.connection.bind(self));
self.httpServer.on('listening', function () {
debug('...Started');
common.events.emit('server:start');
common.events.emit('server.start');
self.logStartMessages();
resolve(self);
});
@ -115,7 +115,7 @@ GhostServer.prototype.stop = function () {
resolve(self);
} else {
self.httpServer.close(function () {
common.events.emit('server:stop');
common.events.emit('server.stop');
self.httpServer = null;
self.logShutdownMessages();
resolve(self);

View file

@ -19,7 +19,7 @@ module.exports = {
debug('init themes', activeThemeName);
// 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();
});

View file

@ -44,7 +44,7 @@ class UrlService {
UrlService.cacheRoute('/subscribe/', {});
// 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');
this.loadResourceUrls();
}));

View file

@ -933,7 +933,7 @@ startGhost = function startGhost(options) {
.then(function () {
customRedirectsMiddleware.reload();
common.events.emit('server:start');
common.events.emit('server.start');
return ghostServer;
});
}