aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJohannes Zellner <johannes@nebulon.de>2015-12-30 19:47:57 +0100
committerJohannes Zellner <johannes@nebulon.de>2015-12-30 19:47:57 +0100
commit1a8d99e453896f9b28b9347c200bdad1113b11f1 (patch)
treebef27e25b498ab70e8d3e1dae6718ac13d7ae499
parentfdb8868ccaf80ad4b096775ecf01baecec84cbb9 (diff)
downloadSurfer-1a8d99e453896f9b28b9347c200bdad1113b11f1.tar.gz
Surfer-1a8d99e453896f9b28b9347c200bdad1113b11f1.tar.zst
Surfer-1a8d99e453896f9b28b9347c200bdad1113b11f1.zip
Provide separate healthcheck route
-rw-r--r--CloudronManifest.json2
-rwxr-xr-xapp.js1
2 files changed, 2 insertions, 1 deletions
diff --git a/CloudronManifest.json b/CloudronManifest.json
index 8f13fef..62f99bc 100644
--- a/CloudronManifest.json
+++ b/CloudronManifest.json
@@ -11,7 +11,7 @@
11 ], 11 ],
12 "version": "0.4.2", 12 "version": "0.4.2",
13 "targetBoxVersion": "0.4.0", 13 "targetBoxVersion": "0.4.0",
14 "healthCheckPath": "/", 14 "healthCheckPath": "/api/healthcheck",
15 "httpPort": 3000, 15 "httpPort": 3000,
16 "manifestVersion": 1, 16 "manifestVersion": 1,
17 "website": "https://github.com/nebulade/surfer", 17 "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
27router.get ('/api/files/*', auth.ldap, files.get); 27router.get ('/api/files/*', auth.ldap, files.get);
28router.put ('/api/files/*', auth.ldap, multipart, files.put); 28router.put ('/api/files/*', auth.ldap, multipart, files.put);
29router.delete('/api/files/*', auth.ldap, files.del); 29router.delete('/api/files/*', auth.ldap, files.del);
30router.get ('/api/healthcheck', function (req, res) { res.status(200).send(); });
30 31
31// welcome screen in case / does not serve up any file yet 32// welcome screen in case / does not serve up any file yet
32var appUrl = process.env.APP_ORIGIN ? process.env.APP_ORIGIN : 'http://localhost:3000'; 33var appUrl = process.env.APP_ORIGIN ? process.env.APP_ORIGIN : 'http://localhost:3000';