how to integrate Nodsjs rendred content with Wordpress ?

macheta

Member
Oct 3, 2019
37
8
8
Hi Dear Members,

i want to ask if any NodsJs or Php experts here have some time to tell me how can i display a rendred Data by a Nodjs app into a wordpress page .

i deployed an app on IP : PORT , the app works fine and it generate some content on an index.html .

now i want to put the generated content on a wordpress page ( btw the nodejs and the wordpress on the same server ).

Thanks
 

Boooob

Active member
Jan 2, 2019
81
91
25
There are 2 ways:
1. Use iframe to embed the NodeJS app (using the url) to your wordpress page
2. Read the content (HTML) return from NodeJS then render it through the wordpress. (I assumed you have website written in NodeJS)
 
  • Like
Reactions: macheta

macheta

Member
Oct 3, 2019
37
8
8
Dear @daominhsangvn , thanks for your reply .

1 - i can' i Iframe the page as i'm using Cloudflare and it block the iframe function , i tried this yesterday .

2 - i'm using a wodpress instalation ( not a headless CMS ) so it's on PHP no Nodejs .

i don't know how can i create a hybride page .

if you are a php or nodejs expert can you offer me a goode price to figured out this to me ? ( payment via credit card i don't have paypal ) Thanks .
 

Boooob

Active member
Jan 2, 2019
81
91
25
I mean you use a plugin to download the content of the url (of your nodejs) then display it within the wordpress page. this method will include everything in the style,js of the nodejs app as well

And sorry i'm not a PHP developer.

There is also another way by have a proxy server in front of your nodejs and wordpress app. This app proxy will detect which url belong to which app (nodejs, wordpress) and proxy the request to the right app.

For example:
This url is your nodejs app: `http://localhost:1234/about-us`
And this is the wordpress: `http://localhost:1112/terms`
When the user access to the url `http://localhost/about-us` your proxy will proxy the request to `http://localhost:1234/about-us`
 
  • Like
Reactions: macheta

macheta

Member
Oct 3, 2019
37
8
8
Thanks @daominhsangvn for your ideas , i tried this morning a mirror function on php it's simillar to the proxy thing you talked about but it didn't work , the html page appear but the rendred content work only on the original page , anyways .. looke like this is not that easy to figure out , i will let that later .. Thanks again .
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu