fix: memory leak while downloading large files

This commit is contained in:
Elias Schneider
2023-10-09 11:14:51 +02:00
parent 38919003e9
commit 97e7d7190d
7 changed files with 53 additions and 16 deletions

View File

@@ -0,0 +1,19 @@
import { Controller, Get, Res } from "@nestjs/common";
import { Response } from "express";
import { PrismaService } from "./prisma/prisma.service";
@Controller("/")
export class AppController {
constructor(private prismaService: PrismaService) {}
@Get("health")
async health(@Res({ passthrough: true }) res: Response) {
try {
await this.prismaService.config.findMany();
return "OK";
} catch {
res.statusCode = 500;
return "ERROR";
}
}
}