presidium-db-client-server 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DatabaseHandler.js +6 -1
- package/package.json +1 -1
package/DatabaseHandler.js
CHANGED
|
@@ -111,7 +111,12 @@ function DatabaseHandler(options) {
|
|
|
111
111
|
request.pathSegments = request.path.slice(1).split("/")
|
|
112
112
|
request.pathDepth = request.pathSegments.length
|
|
113
113
|
|
|
114
|
-
if (request.
|
|
114
|
+
if (request.path == "/health") {
|
|
115
|
+
response.writeHead(200, {
|
|
116
|
+
"Content-Type": "text/plain",
|
|
117
|
+
})
|
|
118
|
+
response.end("OK")
|
|
119
|
+
} else if (request.pathDepth == 2) {
|
|
115
120
|
const tableName = request.pathSegments[0]
|
|
116
121
|
const fname = request.pathSegments[1]
|
|
117
122
|
const ht = hts.get(tableName)
|