Home > Back-end >  Can you add apps made from (js, nodejs, express and mongodb) in a wordpress website?
Can you add apps made from (js, nodejs, express and mongodb) in a wordpress website?

Time:05-07

I already have a wordpress website. I studied web development using js, node.js, express and mongodb and build some projects. I would like to add it to my website. Is this possible or I just need to create a website without wordpress and add my projects?

CodePudding user response:

WordPress has its own rest API you can use WordPress API and a frontend framework like Vuejs or React to interact with WordPress, actually, WordPress is your backend, and the frontend framework is your frontend look at the example below:

https://52hertzcouture.com/

this is my project frontend made with vuejs

https://backend.52hertzcouture.com/wp-login.php

this is my project backend made with WordPress

about nodejs there are some packages like node-wpapi that can help you to connect to wordpress rest api with nodejs as a client and do everything a client can do, for example make posts, make pages, etc.

check out link below:

https://github.com/WP-API/node-wpapi

i think using wordpress as backend and a frontend framework like vuejs as frontend is a good idea if you want to use wordpress and extend your website.

CodePudding user response:

Your best bet is to build another web site with a different host name. WordPress uses a venerable scheme called mod_rewrite where nodejs uses route handlers to make sense of paths. Paths are the /section/page parts of urls like https://example.com/section/page. It will be challenging, to say the least, to integrate those two ways of handling paths.

  • Related