From 9a9b1c4e787f632af2171c7cd220edf4f9d899b5 Mon Sep 17 00:00:00 2001 From: Colin Kennedy Date: Fri, 26 Nov 2021 22:43:23 -0400 Subject: [PATCH] #144 update status response (test redeploy) --- packages/express/src/app.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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); }); });