Get a new Paul Graham essay in your inbox every Monday/Wednesday/Friday
Just show me the code
YOUR_EMAIL_ADDRESS
with a valid email address and YOUR_RESEND_API_KEY
with your Resend API key, and then you can run the following in your terminal:state
, which can be accessed at req.body.$state
and set or updated in the response.
Let’s modify the API handler to take advantage of $state
:
body
for our job, we can write it like this:
https://yourdomain.com/api/pg
, you can create your scheduled job by running the following script in your terminal with your BOOPER_API_KEY
set, and the url
modified to the appropriate domain: