Files
Gabriel Miranda 6671a743d6 feat(render): e2e test for vite and nextjs (#2176)
Signed-off-by: Gabriel Miranda <gabriel@resend.com>
Signed-off-by: gabriel miranda <gabriel@resend.com>
2026-05-12 12:34:09 -03:00

19 lines
439 B
TypeScript

import { render } from '@react-email/render';
export const runtime = 'edge';
export async function GET() {
try {
const html = await render(<div>testing element</div>, { pretty: true });
return new Response(html);
} catch (exception) {
let message = 'Some error ocurred';
if (exception instanceof Error) {
message = exception.toString();
}
return new Response(message, {
status: 500,
});
}
}