Note on repository consolidation
mainThis repository has been consolidated into the resend-examples monorepo. For updated examples across all languages and frameworks, including the Next.js (App Router) examples, visit the new monorepo.
repository·main·Indexed 42 days ago
https://github.com/resend/resend-nextjs-app-router-exampleA reference implementation demonstrating how to integrate Resend's email API with a Next.js application using the App Router architecture.
RESEND_API_KEY environment variable in the Vercel dashboard to enable email functionality.To run this example on your local machine, follow these steps:
.env and populate it with your Resend credentials.npm or yarn to install the required packages.curl request.# 1. Define environment variables
cp .env.example .env
# 2. Install dependencies
npm install
# or
yarn
# 3. Run Next.js locally
npm run dev
# 4. Make a curl request to test the endpoint
curl -X POST http://localhost:3000/api/send