Skip to content

Commit

Permalink
Consistent event names
Browse files Browse the repository at this point in the history
no issue

- rename event to `server.stop`
- rename event to `server.start`
- we are using the dot notation
  • Loading branch information
kirrg001 committed Apr 15, 2018
1 parent 63642fd commit b2a8165
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/server/ghost-server.js
Expand Up @@ -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);
});
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion core/server/services/themes/index.js
Expand Up @@ -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();
});

Expand Down
2 changes: 1 addition & 1 deletion core/server/services/url/UrlService.js
Expand Up @@ -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();
}));
Expand Down
2 changes: 1 addition & 1 deletion core/test/utils/index.js
Expand Up @@ -933,7 +933,7 @@ startGhost = function startGhost(options) {
.then(function () {
customRedirectsMiddleware.reload();

common.events.emit('server:start');
common.events.emit('server.start');
return ghostServer;
});
}
Expand Down

0 comments on commit b2a8165

Please sign in to comment.