Skip to content

Commit

Permalink
fix: health route for automatic restart of server
Browse files Browse the repository at this point in the history
  • Loading branch information
irony committed Jun 12, 2024
1 parent 52c0bbe commit 8d0a5f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions api/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const io = new Server(server, {
})

app.use('/assets', express.static(path.join(__dirname, '../assets')))
app.get('/healthz', (req, res) => res.send('ok'))

server.listen(port, () => {
console.log(`listening on *:${port}`)
Expand Down
4 changes: 2 additions & 2 deletions k8s/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ spec:
name: http
readinessProbe:
httpGet:
path: /
path: /socket.io/socket.io.js
port: http
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: /
path: /socket.io/socket.io.js
port: http
initialDelaySeconds: 30
periodSeconds: 60
Expand Down

0 comments on commit 8d0a5f3

Please sign in to comment.