-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #749 from wellcomecollection/rk/add-healthcheck-en…
…dpoint-concepts Adds a simple healthcheck endpoint for the concepts service
- Loading branch information
Showing
5 changed files
with
24 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { RequestHandler } from "express"; | ||
import asyncHandler from "express-async-handler"; | ||
import { Config } from "../../config"; | ||
|
||
type PathParams = { id: string }; | ||
|
||
const healthcheckController = (config: Config): RequestHandler<PathParams> => { | ||
return asyncHandler(async (req, res) => { | ||
res.status(200).json({ | ||
status: "ok", | ||
config, | ||
}); | ||
}); | ||
}; | ||
|
||
export default healthcheckController; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import conceptController from "./concept"; | ||
import conceptsController from "./concepts"; | ||
import healthcheckController from "./healthcheck"; | ||
|
||
export { errorHandler } from "./error"; | ||
export { conceptController, conceptsController }; | ||
export { conceptController, conceptsController, healthcheckController }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters