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 c6b68f7 commit 1dbaf35Copy full SHA for 1dbaf35
app8/index.js
@@ -28,17 +28,21 @@ const amIDead = () => {
28
return deadFromRandom
29
}
30
31
+router.get('/', ctx => {
32
+ ctx.status = iAmDead ? 500 : 200
33
+ ctx.body = iAmDead ? 'broken' : 'app works'
34
+})
35
+
36
router.get('/healthz', ctx => {
37
ctx.status = iAmDead ? 500 : 200
38
39
console.log(`Received a request to healthz and responding with status ${ctx.status}`)
40
iAmDead = amIDead()
41
})
42
-
43
app.use(router.routes())
44
45
app.listen(PORT, () => {
46
- console.log(`Started in port ${PORT}`)
47
+ console.log(`Version ${version} started in port ${PORT}`)
48
0 commit comments