Skip to content
This repository was archived by the owner on Jun 10, 2021. It is now read-only.

Commit e81ffbb

Browse files
committed
Added simple healthcheck URL for Kubernetes support
1 parent 8600a9a commit e81ffbb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ if (isDev) { // Serve files from src directory and use webpack-dev-server
3535
app.engine('handlebars', exphbs());
3636
app.set('view engine', 'handlebars');
3737

38+
// Some infrastructure (e.g. Kubernetes) needs simple healthchecks
39+
app.get('/health', (req, res) => {
40+
console.log('Healthcheck complete');
41+
res.send('OK');
42+
});
43+
3844
// parse various different custom JSON types as JSON
3945
app.use(bodyParser.json());
4046

0 commit comments

Comments
 (0)