import { NextResponse } from "next/server"; export async function POST(req: Request) { try { const body = await req.json(); const response = await fetch("http://localhost:3001/auth/signup", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(body), }); const data = await response.json(); return NextResponse.json(data, { status: response.status }); } catch (error) { return NextResponse.json( { error: "Auth backend not reachable" }, { status: 500 } ); } }