diff --git a/api/relayer-config.ts b/api/relayer-config.ts new file mode 100644 index 000000000..1118c2ce3 --- /dev/null +++ b/api/relayer-config.ts @@ -0,0 +1,21 @@ +import { VercelResponse } from "@vercel/node"; +import { TypedVercelRequest } from "./_types"; + +const handler = async ( + request: TypedVercelRequest, + response: VercelResponse +) => { + if (request.method === "GET") { + // Handle GET request + response.status(200).json({ message: "GET request received" }); + } else if (request.method === "POST") { + // Handle POST request + response.status(200).json({ message: "POST request received" }); + } else { + // Method not allowed + response.setHeader("Allow", ["GET", "POST"]); + response.status(405).end(`Method ${request.method} Not Allowed`); + } +}; + +export default handler;