Download src/app/api/version/shutdown/route.js from heyeyydss/api9nin: direct link, hf CLI and curl.
- Browser
- Download file 425 Bytes
-
https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/src/app/api/version/shutdown/route.js
- Command line
-
hf download hf://spaces/heyeyydss/api9nin/src/app/api/version/shutdown/route.js
-
curl -L -o route.js https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/src/app/api/version/shutdown/route.js
425 Bytes
| import { NextResponse } from "next/server"; | |
| import { killAppProcesses } from "@/lib/appUpdater"; | |
| // Shutdown app to release file locks for manual update | |
| export async function POST() { | |
| try { | |
| await killAppProcesses(); | |
| } catch { /* best effort */ } | |
| const response = NextResponse.json({ success: true, message: "Shutting down for manual update..." }); | |
| setTimeout(() => process.exit(0), 500); | |
| return response; | |
| } | |