# How can I integrated a nodejs application within my ghost?

**URL:** <https://forum.ghost.org/t/how-can-i-integrated-a-nodejs-application-within-my-ghost/42790>\
**Category:** Developer help\
**Created:** [November 17, 2023, 11:52pm UTC](https://forum.ghost.org/t/how-can-i-integrated-a-nodejs-application-within-my-ghost/42790 "2023-11-17T23:52:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenji\_Bailly](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kenji_bailly/32/11814_2.png) [@Kenji\_Bailly](https://forum.ghost.org/u/Kenji_Bailly)\
**Post date:** [November 17, 2023, 11:52pm UTC](https://forum.ghost.org/t/how-can-i-integrated-a-nodejs-application-within-my-ghost/42790/1 "2023-11-17T23:52:41Z")

</div>

Basically I want to integrate a stripe checkout of my products.

> **[Stripe-hosted page](https://stripe.com/docs/checkout/quickstart)**

For that I need to have a nodejs app running. I’m wondering if I can do that within my ghost or do I have to setup a separate nodejs app?

For development I’m using ghost local.  
For my live site I’m using dockerized ghost.

Right now the only way I can see this working is by creating a new docker container with nodejs running and proxying the nodejs app to my domain with a location (/create-checkout-session)

But it would be cleaner if I could integrate it in my already existing ghost app.

Is there a way to do this? And if so, please let me know how.

---

<div class="post-metadata">

**Author:** ![markstos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/markstos/32/18182_2.png) [@markstos](https://forum.ghost.org/u/markstos)\
**Post date:** [November 18, 2023, 12:04am UTC](https://forum.ghost.org/t/how-can-i-integrated-a-nodejs-application-within-my-ghost/42790/2 "2023-11-18T00:04:51Z")

</div>

Ghost already has built-in Stripe integration including one-off payments. What features are missing for you?

---

<div class="post-metadata">

**Author:** ![markstos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/markstos/32/18182_2.png) [@markstos](https://forum.ghost.org/u/markstos)\
**Post date:** [November 18, 2023, 12:07am UTC](https://forum.ghost.org/t/how-can-i-integrated-a-nodejs-application-within-my-ghost/42790/3 "2023-11-18T00:07:58Z")

</div>

Ghost is meant to be extended with external apps and API calls, so you’ve got the right idea by running a separate app in a different container.

You could modify Ghost’s code directly, but then you’d be going down the path of a fork of Ghost, which is likely to be painful.

---

<div class="post-metadata">

**Author:** ![Kenji\_Bailly](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kenji_bailly/32/11814_2.png) [@Kenji\_Bailly](https://forum.ghost.org/u/Kenji_Bailly)\
**Post date:** [November 18, 2023, 12:49am UTC](https://forum.ghost.org/t/how-can-i-integrated-a-nodejs-application-within-my-ghost/42790/4 "2023-11-18T00:49:22Z")

</div>

I’m planning on creating a shopping cart system in Javascript and passing on the price API ID’s of the products of Stripe through a post form to then redirect to a one time payment on the stripe hosted page. Can this be done within ghost? If so please let me know what I need.  
If this isn’t possible, I’ll create a separate docker container, I don’t really want to create a fork of Ghost

---

<div class="post-metadata">

**Author:** ![markstos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/markstos/32/18182_2.png) [@markstos](https://forum.ghost.org/u/markstos)\
**Post date:** [November 18, 2023, 12:50am UTC](https://forum.ghost.org/t/how-can-i-integrated-a-nodejs-application-within-my-ghost/42790/5 "2023-11-18T00:50:29Z")

</div>

Ghost just has simple subscriptions and one off payments. I’m not aware that it has a shopping cart feature.

---

<div class="post-metadata">

**Author:** ![Kenji\_Bailly](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kenji_bailly/32/11814_2.png) [@Kenji\_Bailly](https://forum.ghost.org/u/Kenji_Bailly)\
**Post date:** [November 18, 2023, 1:32am UTC](https://forum.ghost.org/t/how-can-i-integrated-a-nodejs-application-within-my-ghost/42790/6 "2023-11-18T01:32:02Z")

</div>

No it doesn’t have a shopping cart feature, I’m gonna code that myself. But is there a way to pass on the price API ID’s somehow? If so I wouldn’t need a separate nodejs container

---

<div class="post-metadata">

**Author:** ![markstos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/markstos/32/18182_2.png) [@markstos](https://forum.ghost.org/u/markstos)\
**Post date:** [November 18, 2023, 1:33am UTC](https://forum.ghost.org/t/how-can-i-integrated-a-nodejs-application-within-my-ghost/42790/7 "2023-11-18T01:33:54Z")

</div>

Putting data into a POST request could be done with JavaScript via a template. And you could store state in a cookie.
