Hi Dears,
I am trying to link my nodejs app with my website on wix, so when i redirect the user to the nodejs app from wix, it should return a json file to wix site where i can use it.
Is there a documentation how to link nodejs app with wix or how to accept that json file ?
Regards,
#Rawabi
You can use the wix-fetch api here is the link wix-fetch - Velo API Reference - Wix.com
The api is quite close for the jQuery ajax function
#Rawabi
Yes buddy, I had a look at that before, but i am asking if there is a built-in api in wix that interacts with nodejs app specially it is on localhost.
Any way, Thanks dude i will try with wix-fetch to do that.
hello my friend if you want to connect your wix app to your nodejs app you should know that your nodejs app must be hosted on a https server beside that you must make apis for your nodejs script byyour slef
for exmaple
nodejs -
app.get(‘(/api/getusers)’, function (req, res) {
res.send({user1:{name:“rad”,pass:“asdasd”},
user2:{name:“rad”,pass:“asdasd”}
});
});
and then use the fetch api from wix to connect to your nodejs app api
dont forget that your nodejs app must be hosted on a https server
#rawabi
Another note - if you run the nodejs app on localhost, you’ll only be able to access it from a local browser (unless you open a port to the web).
On the other hand, you may want to run the same functionality on WixCode in the backend. It’s also essentially nodejs.
well, good to know guys !!.
Thank you very much.