---
title: "Discussion on \"Building a Blog Subscription and Pusher with AirCode and Resend\" | Hashnode"
description: "Discussion on \"Building a Blog Subscription and Pusher with AirCode and Resend\". Learn how to build subscription and push notification services in Node.js and Next.js, and send your first email using the Resend Node.js SDK on AirCode."
url: "https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Building a Blog Subscription and Pusher with AirCode and Resend](https://aircode.hashnode.dev/building-a-blog-subscription-and-pusher-with-aircode-and-resend?utm_source=hashnode&utm_medium=feed)

Learn how to build subscription and push notification services in Node.js and Next.js, and send your first email using the Resend Node.js SDK on AirCode.

Aug 28, 2023 · 15 min read · aircode.hashnode.dev  
Updated Aug 30, 2023  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Kevin Wu](https://hashnode.com/@0xinhua)

@0xinhua

  
[View profile](https://hashnode.com/@0xinhua)

Developing TwitterShots.com , MRR $0. Independent developer, ex ByteDance.

Indie maker | Learn Build Connect 🚀 | former ByteDance eng | currently $0 MRR https://TwitterShots.com - make pretty Tweet screenshot

## Responses 3

Markdown supported · ⌘↵ to post

[Roy Ibarra](https://hashnode.com/@rodrigoibarra)

[Aug 30, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64eec4ca9aae004fb5a8e9a8)

Hey there! I'm stuck in the last step.. I'm receiving this error when tried to test the email: "error": "Cannot destructure property 'title' of 'post' as it is undefined."

[Kevin Wu](https://hashnode.com/@0xinhua)

[Aug 30, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64eec4ca9aae004fb5a8e9a8#reply-64ef4aedd354aa64633d9e03)

Hey Roy, Kevin here, Make sure you paste the parameters on the Params panel, Check the code where bug reported, and the params you input and the Type of parameter in function. This error may be caused by a different params structure, I also update the demo code to make it more straightforward and understandable.

you can compare the full code here:

[github.com/AirCodeLabs/aircode/tree/main/examples…](https://github.com/AirCodeLabs/aircode/tree/main/examples/blog-subscription-and-pushing)

or you can simply copy a App from README.md Button "Depoly to AirCode" .

feel free to contact me if you still have not solved the problem.

[Roy Ibarra](https://hashnode.com/@rodrigoibarra)

[Sep 9, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64eec4ca9aae004fb5a8e9a8#reply-64fce8531e7506bcd95c1724)

[Kevin Wu](https://hashnode.com/@0xinhua) Thank you! Unfortunately I couldn't finish it.

[Roy Ibarra](https://hashnode.com/@rodrigoibarra)

[Aug 29, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ede2b39aae004fb5a8d4a4)

Hey there! After the installation of SWR, you said "Copy the following code in this file:". Which is the file we need to create or modify? It is not clear 😕. Besides that, thank you for the tutorial and fantastic idea.

[Roy Ibarra](https://hashnode.com/@rodrigoibarra)

[Aug 29, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ede2b39aae004fb5a8d4a4#reply-64ee13bb0f36f04fe5fe3800)

[Kevin Wu](https://hashnode.com/@0xinhua) Thank you! It is very clear now. I'm having a conflict with the params, I'm receiving undefined from the restructuring const { email } = params; Do you have an idea why? Could be related with aircode library?

[Kevin Wu](https://hashnode.com/@0xinhua)

[Aug 29, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ede2b39aae004fb5a8d4a4#reply-64ee17890f36f04fe5fe3861)

Hey [Roy Ibarra](https://hashnode.com/@rodrigoibarra)

There may be some problems with the Fetch header, try adding Content-Type to your fetch request header in src/app/page.tsx, e.g. 'Content-Type': 'application/json', and try again.

```
  async function sendRequest(url: string, { arg }: { arg: { email: string }}) {
    return fetch(url, {
      headers: {
        'Content-Type': 'application/json'
      },
      method: 'POST',
      body: JSON.stringify(arg)
    }).then(res => res.json())
  }
```

Thank you for your feedback. I will add a headers and update this part code.

[Roy Ibarra](https://hashnode.com/@rodrigoibarra)

[Aug 29, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ede2b39aae004fb5a8d4a4#reply-64ee3da30f36f04fe5fe3b95)

[Kevin Wu](https://hashnode.com/@0xinhua) it worked! Thank you!

[Daniela Passos](https://hashnode.com/@danielapassos)

[Aug 28, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ed1e5f8d5cb3418f0f9ed9)

That’s awesome!

[Kevin Wu](https://hashnode.com/@0xinhua)

[Aug 29, 2023](https://hashnode.com/posts/building-a-blog-subscription-and-pusher-with-aircode-and-resend/64ecb2855b8e2530ca02f610/comment/64ed1e5f8d5cb3418f0f9ed9#reply-64ed36bb3a8717415f5e163b)

Hey Daniela, Glad you found it valuable. Thanks for reading!
