React WebMail - BackEnd(3) HealthCheck API 생성


React WebMail - BackEnd(3) HealthCheck API 생성

1. 디렉토리 및 파일 생성 API를 개발할 수 있도록 미리 필요한 디렉토리와 파일을 생성한다. src routers controllers api apiController.ts healthCheck heaalthCheckController.ts middlewares healthCheck healthCheckMiddleware.ts src 디렉토리를 새로 만들고, 다음과 같이 생성한다. [그림 1] 디렉토리와 파일 생성 구조는 다음과 같다. 2. healthCheck API 미들웨어 작성 src/routers/middlewares/healthcheck/healthCheckMiddlewares.ts로 이동 후, 다음과 같이 입력한다. import { Request, Response } from 'express'; class HealthCheckMiddleware { get = (req: Request, res: Response): void => { res.status(20...



원문링크 : React WebMail - BackEnd(3) HealthCheck API 생성