Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Add ping for liveness (#17)
Browse files Browse the repository at this point in the history
* Add ping for liveness

* ES6-ed
  • Loading branch information
Wardormeur authored Nov 10, 2017
1 parent 387eb03 commit 6cd94bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cd-organisations.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const orgEntity = require('./lib/organisations/entities/org');
const userOrgEntity = require('./lib/organisations/entities/userOrg');
const orgController = require('./lib/organisations/controllers/org/index');
const userOrgController = require('./lib/organisations/controllers/userOrg/index');
// Utils
const pingCmd = require('./lib/ping');

function cdOrganisations() {
// https://github.com/senecajs/seneca/issues/112
Expand Down Expand Up @@ -69,7 +71,7 @@ function cdOrganisations() {
});

// Load utilities
// -> none atm
seneca.add({ role: plugin, cmd: 'ping' }, pingCmd);

return {
name: plugin,
Expand Down
4 changes: 4 additions & 0 deletions lib/ping.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const ping = (args, done) => {
done(null, { status: 'ok' });
};
module.exports = ping;

0 comments on commit 6cd94bc

Please sign in to comment.