[CORL-388] Health Check (#2336)

* feat: added prelim health-check endpoint

* Update health.ts

* Update health.ts

* fix: lint
This commit is contained in:
Wyatt Johnson
2019-05-31 23:20:00 +00:00
committed by GitHub
parent 132ffdb2dc
commit 1cf2f61bfb
3 changed files with 10 additions and 0 deletions
@@ -0,0 +1,5 @@
import { RequestHandler } from "express";
export const healthHandler: RequestHandler = (req, res, next) => {
res.status(200).send("OK");
};
@@ -1,5 +1,6 @@
export * from "./account";
export * from "./auth";
export * from "./graphql";
export * from "./health";
export * from "./install";
export * from "./version";
+4
View File
@@ -4,6 +4,7 @@ import passport from "passport";
import { AppOptions } from "coral-server/app";
import {
graphQLHandler,
healthHandler,
installHandler,
versionHandler,
} from "coral-server/app/handlers";
@@ -32,6 +33,9 @@ export function createAPIRouter(app: AppOptions, options: RouterOptions) {
// Configure the version route.
router.get("/version", versionHandler);
// Configure the Health route.
router.get("/health", healthHandler);
// Installation middleware.
router.use(
"/install",