diff --git a/packages/express/src/app.ts b/packages/express/src/app.ts index 40efcdb9..0122db56 100644 --- a/packages/express/src/app.ts +++ b/packages/express/src/app.ts @@ -117,16 +117,21 @@ app.post('/', (req, res) => { }); app.get('/', (req, res) => { + let status = 'Express service is running.\n'; + CouchDB.session() .then((s) => { if (s.ok) { - res.send(`Couchdb session is active. (this message is from express...)`); + status += 'Couchdb is running.\n'; } else { - res.send(`Couchdb session is ... not ok?`); + status += 'Couchdb session is NOT ok.\n'; } }) .catch((e) => { - res.send(`Problems in the couch session! ${JSON.stringify(e)}`); + status += `Problems in the couch session! ${JSON.stringify(e)}`; + }) + .finally(() => { + res.send(status); }); });