Create a webhook that runs code on your laptop via ngrok
Last updated
Last updated
Create a NextJS app by running npx create-next-app nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/master/basics/api-routes-starter"
Create pages/api/user.js
with:
In a terminal run npm run dev
Install Ngrok from
In a terminal run ngrok http 3000
Copy the URL output by Ngrok and add /api/user
to the end
Log in to and create a new webhook.
Paste the URL from step 6 into the destination.
Click Save
Click on the Invocation URI
link to trigger the webhook.
Confirm that the response is 200
and contains JSON { name: "John Doe" }
Currently the Carbon Aware SDK only supports a limited list of locations but when more locations are supported then we will be able to allow you to put in the location where your computer or laptop is running in order to determine if it is the location with the lowest carbon intensity.