<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to add server-side code (Node.js) on HubSpot in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-server-side-code-Node-js-on-HubSpot/m-p/1201707#M44135</link>
    <description>&lt;P data-start="0" data-end="766"&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/833185"&gt;@Hiss&lt;/a&gt;&amp;nbsp; ,&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;In 2025, HubSpot pages don’t run raw Node.js; you either use a small external service or HubSpot’s serverless functions. Since you only need to HMAC the Stripe customer ID for Churnkey, the clean native path is a serverless function: create a project, add a serverless function that computes user_hash, deploy,&amp;nbsp;then call that endpoint from your page/module and pass the result into the embedded script&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;(&lt;A href="https://developers.hubspot.com/docs/cms/start-building/features/serverless-functions/overview" target="_blank"&gt;https://developers.hubspot.com/docs/cms/start-building/features/serverless-functions/overview&lt;/A&gt; )&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;The quickstart shows the exact structure, including where the function file lives and how to expose the endpoint (&lt;A href="https://developers.hubspot.com/docs/cms/start-building/features/serverless-functions/getting-started-with-serverless-functions" target="_blank"&gt;https://developers.hubspot.com/docs/cms/start-building/features/serverless-functions/getting-started-with-serverless-functions&lt;/A&gt; )&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="949" data-end="1707"&gt;If you decide to host this externally, Heroku isn’t a great fit anymore. The free and low-tier dynos tend to sleep, IP addresses rotate, and callbacks can silently fail exactly the kind of fragility you don’t want when verifying Stripe requests.&lt;/P&gt;
&lt;P data-start="949" data-end="1707"&gt;Even with paid dynos, you’re still left managing uptime, scaling, and monitoring yourself. By contrast, Stacksync removes that operational burden: it runs your integrations on stable infrastructure, handles auth rotation, retries, and event logging automatically, and guarantees real-time two-way sync between HubSpot and your source system. That way, your cancel flow verification stays reliable without you needing to babysit servers or rebuild plumbing when data scales.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Sep 2025 13:34:44 GMT</pubDate>
    <dc:creator>RubenBurdin</dc:creator>
    <dc:date>2025-09-17T13:34:44Z</dc:date>
    <item>
      <title>How to add server-side code (Node.js) on HubSpot</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-server-side-code-Node-js-on-HubSpot/m-p/1046772#M40786</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm creating a cancel flow page on my website.&lt;/P&gt;&lt;P&gt;To include a cancel form by Churnkey platform on the page, I added HTML code.&lt;/P&gt;&lt;P&gt;As a second step, I need to add node.js code as below to implement server-side verification.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;&lt;SPAN class=""&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; crypto = &lt;/SPAN&gt;&lt;SPAN class=""&gt;require&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"crypto"&lt;/SPAN&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;SPAN class=""&gt;const&lt;/SPAN&gt; &lt;SPAN class=""&gt;API_KEY&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN class=""&gt;"CK_SECRET"&lt;/SPAN&gt;&lt;SPAN&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;&lt;SPAN class=""&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; user_hash = crypto.&lt;/SPAN&gt;&lt;SPAN class=""&gt;createHmac&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN class=""&gt;"sha256"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;API_KEY&lt;/SPAN&gt;&lt;SPAN&gt; ).&lt;/SPAN&gt;&lt;SPAN class=""&gt;update&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;STRIPE_CUSTOMER_ID&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;SPAN class=""&gt;digest&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"hex"&lt;/SPAN&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;FONT color="#999999"&gt;&lt;SPAN class=""&gt;// Send to front-end&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I have no idea where I need to add the code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I appreciate any help provided.&lt;BR /&gt;Best regards,&lt;BR /&gt;Hiss&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 03:59:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-add-server-side-code-Node-js-on-HubSpot/m-p/1046772#M40786</guid>
      <dc:creator>Hiss</dc:creator>
      <dc:date>2024-09-27T03:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to add server-side code (Node.js) on HubSpot</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-server-side-code-Node-js-on-HubSpot/m-p/1046899#M40791</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/833185"&gt;@Hiss&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So, HubSpot doesn’t natively support server-side code like Node.js since it’s a client-side CMS platform. That being said, you’ve got a few options to make this work.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You’ll need to run that Node.js code on an external server (like AWS Lambda, Heroku, or your own server). Once the verification is done, you can send the response back to your HubSpot page using an API call.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If you’re using HubSpot CMS Enterprise, you can use their serverless functions feature. This lets you run backend code directly in HubSpot. Check out their serverless functions documentation.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Once you have your verification logic running on the external server, send the user_hash back to your HubSpot page using AJAX, and then embed it into the frontend.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I hope it helps, let me know if you need to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://calendly.com/khushboo-pokhriyal/30min?month=2024-08" target="_blank" rel="noopener nofollow noreferrer"&gt;talk&lt;/A&gt;!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Khushboo Pokhriyal&lt;/P&gt;&lt;P&gt;Growth &amp;amp; Operations&lt;/P&gt;&lt;P&gt;GroRapid Labs&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.linkedin.com/in/khushboopokhriyal" target="_blank" rel="noopener nofollow noreferrer"&gt;LinkedIn |&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="tel:9315044754" target="_blank" rel="noopener nofollow noreferrer"&gt;9315044754 |&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="mailto:khushboo.pokhriyal@grorapid.com" target="_blank" rel="noopener nofollow noreferrer"&gt;Email |&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://www.grorapidlabs.com/" target="_blank" rel="noopener nofollow noreferrer"&gt;Website&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 09:32:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-add-server-side-code-Node-js-on-HubSpot/m-p/1046899#M40791</guid>
      <dc:creator>KhushbooP11</dc:creator>
      <dc:date>2024-09-27T09:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to add server-side code (Node.js) on HubSpot</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-server-side-code-Node-js-on-HubSpot/m-p/1048221#M40814</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;SPAN&gt;Khushboo!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;By following the quick start document below, I could be able to edit CSS in the test page.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://developers.hubspot.com/docs/cms/guides/getting-started?hsCtaTracking=28bfd0e9-ec05-48a5-b069-ce20015f54ac%7Cc66b91fb-14b1-4c35-ab0d-7e4af8000592" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/cms/guides/getting-started?hsCtaTracking=28bfd0e9-ec05-48a5-b069-ce20015f54ac%7Cc66b91fb-14b1-4c35-ab0d-7e4af8000592&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For the next step, I need to edit the front end and back end on a specific page in my website. However, I have no clue how to edit the front (HTML) and back end (Node.js) functions on the specific page. Appreciate if you give me instructions.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hiss&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 06:43:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-add-server-side-code-Node-js-on-HubSpot/m-p/1048221#M40814</guid>
      <dc:creator>Hiss</dc:creator>
      <dc:date>2024-10-01T06:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to add server-side code (Node.js) on HubSpot</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-server-side-code-Node-js-on-HubSpot/m-p/1201707#M44135</link>
      <description>&lt;P data-start="0" data-end="766"&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/833185"&gt;@Hiss&lt;/a&gt;&amp;nbsp; ,&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;In 2025, HubSpot pages don’t run raw Node.js; you either use a small external service or HubSpot’s serverless functions. Since you only need to HMAC the Stripe customer ID for Churnkey, the clean native path is a serverless function: create a project, add a serverless function that computes user_hash, deploy,&amp;nbsp;then call that endpoint from your page/module and pass the result into the embedded script&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;(&lt;A href="https://developers.hubspot.com/docs/cms/start-building/features/serverless-functions/overview" target="_blank"&gt;https://developers.hubspot.com/docs/cms/start-building/features/serverless-functions/overview&lt;/A&gt; )&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;The quickstart shows the exact structure, including where the function file lives and how to expose the endpoint (&lt;A href="https://developers.hubspot.com/docs/cms/start-building/features/serverless-functions/getting-started-with-serverless-functions" target="_blank"&gt;https://developers.hubspot.com/docs/cms/start-building/features/serverless-functions/getting-started-with-serverless-functions&lt;/A&gt; )&lt;/P&gt;
&lt;P data-start="0" data-end="766"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="949" data-end="1707"&gt;If you decide to host this externally, Heroku isn’t a great fit anymore. The free and low-tier dynos tend to sleep, IP addresses rotate, and callbacks can silently fail exactly the kind of fragility you don’t want when verifying Stripe requests.&lt;/P&gt;
&lt;P data-start="949" data-end="1707"&gt;Even with paid dynos, you’re still left managing uptime, scaling, and monitoring yourself. By contrast, Stacksync removes that operational burden: it runs your integrations on stable infrastructure, handles auth rotation, retries, and event logging automatically, and guarantees real-time two-way sync between HubSpot and your source system. That way, your cancel flow verification stays reliable without you needing to babysit servers or rebuild plumbing when data scales.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Sep 2025 13:34:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-add-server-side-code-Node-js-on-HubSpot/m-p/1201707#M44135</guid>
      <dc:creator>RubenBurdin</dc:creator>
      <dc:date>2025-09-17T13:34:44Z</dc:date>
    </item>
  </channel>
</rss>

