Skip to content

Commit dd91e10

Browse files
chore: add /api/health and point Railway healthcheck to it
1 parent 4b0b15e commit dd91e10

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

railway.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ builder = "nixpacks"
33

44
[deploy]
55
startCommand = "bash start.sh"
6-
healthcheckPath = "/"
6+
healthcheckPath = "/api/health"
77
healthcheckTimeout = 300
88
restartPolicyType = "on_failure"
99
restartPolicyMaxRetries = 10

src/app/api/health/route.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { NextResponse } from "next/server";
2+
3+
export async function GET() {
4+
return NextResponse.json({ status: "ok" }, { status: 200 });
5+
}
6+
7+

0 commit comments

Comments
 (0)