We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30ab256 commit 15afb88Copy full SHA for 15afb88
src/index.js
@@ -38,6 +38,18 @@ module.exports = (options, done) => {
38
39
// magic starts here
40
app.use("/", router(options));
41
+ app.use("/healthcheck", (req, res) => {
42
+ res.set({ 'Content-Type': 'application/json; charset=utf-8' })
43
+ res.send(JSON.stringify({
44
+ name: process.env.npm_package_name,
45
+ version: process.env.npm_package_version,
46
+ uptimeSeconds: process.uptime(),
47
+ memory: process.memoryUsage(),
48
+ pid: process.pid,
49
+ versions: process.versions,
50
+ }, null, 2));
51
+
52
+ });
53
54
app.listen(options.port);
55
0 commit comments