• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

how to integrate Nodsjs rendred content with Wordpress ?

macheta

Member
Oct 3, 2019
54
15
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
 
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
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 .
 
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
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 .
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock