-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: memory leak while downloading large files
- Loading branch information
1 parent
3891900
commit 97e7d71
Showing
7 changed files
with
53 additions
and
16 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
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,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"; | ||
} | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
events {} | ||
|
||
http { | ||
server { | ||
listen 3000; | ||
client_max_body_size 100M; | ||
|
||
location /api { | ||
proxy_pass http://localhost:8080; | ||
proxy_set_header X-Forwarded-Host $host:$server_port; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
location / { | ||
proxy_pass http://localhost:3333; | ||
proxy_set_header X-Forwarded-Host $host:$server_port; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} | ||
} |