Skip to content

Commit

Permalink
add sha to status endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
elrayle committed Jan 16, 2024
1 parent 3859f49 commit e506fa0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const express = require('express')
const router = express.Router()

router.get('/', function(req, res) {
const sha = require('child_process')
.execSync('git rev-parse HEAD')
.toString().trim()
const msg = `{ "status": "OK", "sha": "${sha}" }`

Check failure on line 10 in routes/index.js

View workflow job for this annotation

GitHub Actions / Build and Deploy

'msg' is assigned a value but never used

Check failure on line 10 in routes/index.js

View workflow job for this annotation

GitHub Actions / build

'msg' is assigned a value but never used
res.status(200).send({ status: 'OK' })
})

Expand Down

0 comments on commit e506fa0

Please sign in to comment.