This is an example Next.js app to show how you can use Mergent with Next.js.
- Run the Next.js development server with
npm run dev
- Start ngrok to get a publicly accessible URL with
ngrok http 3000
(ngrok + Mergent docs) - Set your Mergent API Key and base URL from ngrok in
pages/api/tasks/send-email.ts
Open http://localhost:3000 to run the example.
You can view the tasks in the Mergent console.
Logs will be shown in the Next.js console.
To learn more about Mergent, take a look at the following resources: