Skip to content

Commit

Permalink
Merge pull request #18 from Cardinal-Cryptography/fixes
Browse files Browse the repository at this point in the history
RM sha from /health
  • Loading branch information
deuszx authored May 16, 2024
2 parents 7322816 + 7f800b2 commit bb0b538
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:20-alpine

RUN apk add bash curl git
RUN apk add bash curl

WORKDIR /common-api
COPY . .
Expand Down
5 changes: 0 additions & 5 deletions src/servers/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ import express from "express";
import { Config } from "../../config";

const addressRegex = /[\w\d]{48}/;
const sha = require("child_process")
.execSync("git rev-parse --short HEAD")
.toString()
.trim();

export function healthcheckEnpoint(app: express.Express, config: Config) {
app.get("/health", (_req, res) => {
const status = {
priceCacheEnabled: config.enablePriceCache,
demoModeEnabled: config.enableDemoMode,
graphqlUpdatesEnabled: config.enableGraphql,
sha: sha,
};
res.send(status);
});
Expand Down

0 comments on commit bb0b538

Please sign in to comment.