Skip to content

Commit

Permalink
ADD health check
Browse files Browse the repository at this point in the history
  • Loading branch information
wabscale committed Mar 19, 2024
1 parent 2ce3938 commit bc129f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: pincer
services:
pincer:
image: registry.digitalocean.com/anubis/pincer:${GIT_TAG:-latest}
ports:
- 8000:8000
build:
context: .
dockerfile: Dockerfile.server
Expand Down
4 changes: 4 additions & 0 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ const authMiddleware = (
next();
};

app.get("/", async (req: Request, res) => {
return res.status(200).json({'status': 'alive'}).send();
});

app.post("/user", authMiddleware, async (req: UserRequest, res) => {
if (!req.body.netId) {
logger.error("missing netid in the request body");
Expand Down

0 comments on commit bc129f0

Please sign in to comment.