From 1a8d99e453896f9b28b9347c200bdad1113b11f1 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Wed, 30 Dec 2015 19:47:57 +0100 Subject: [PATCH] Provide separate healthcheck route --- CloudronManifest.json | 2 +- app.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CloudronManifest.json b/CloudronManifest.json index 8f13fef..62f99bc 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -11,7 +11,7 @@ ], "version": "0.4.2", "targetBoxVersion": "0.4.0", - "healthCheckPath": "/", + "healthCheckPath": "/api/healthcheck", "httpPort": 3000, "manifestVersion": 1, "website": "https://github.com/nebulade/surfer", diff --git a/app.js b/app.js index 4570b07..678f391 100755 --- a/app.js +++ b/app.js @@ -27,6 +27,7 @@ var multipart = multipart({ maxFieldsSize: 2 * 1024, limit: '512mb', timeout: 3 router.get ('/api/files/*', auth.ldap, files.get); router.put ('/api/files/*', auth.ldap, multipart, files.put); router.delete('/api/files/*', auth.ldap, files.del); +router.get ('/api/healthcheck', function (req, res) { res.status(200).send(); }); // welcome screen in case / does not serve up any file yet var appUrl = process.env.APP_ORIGIN ? process.env.APP_ORIGIN : 'http://localhost:3000'; -- 2.41.0