Skip to content

Commit

Permalink
Merge pull request #618 from derbyjs/better-integration-api
Browse files Browse the repository at this point in the history
Add better integration methods to App
  • Loading branch information
craigbeck committed Jun 22, 2023
2 parents fc410a1 + 0268430 commit 6cae33f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/AppForServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ AppForServer.prototype._updateScriptViews = function() {
};

AppForServer.prototype._autoRefresh = function(backend) {
// already been setup if agents is defined
if (this.agents) return;
this.agents = {};
var app = this;

Expand Down Expand Up @@ -337,3 +339,11 @@ AppForServer.prototype._refreshStyles = function(filename, styles) {
this.agents[id].send(message);
}
};

AppForServer.prototype.middleware = function(backend) {
return [backend.modelMiddware(), this.router()];
}

AppForServer.prototype.initAutoRefresh = function(backend) {
this._autoRefresh(backend);
}

0 comments on commit 6cae33f

Please sign in to comment.