0
I am learning Reactjs, I made on the front end a simple screen of registration and I made the back end generating Ips with Nodejs, following this tutorial: https://jsao.io/2018/03/creating-a-rest-api-with-node-js-and-oracle-database/
Now I need to know how I communicate between my back end and my front end ?
Since they are in separate projects(I made the front in one folder, back in another)
With HTTP requests.
– Woss
You have to post your codes, to see exactly how to solve your problem.
– Jonathan de Toni
@Jonathandetoni can be git ? https://github.com/VeronicaEms/apiRest This is all my backend with Apis.
– Verônica Emschermann
Describing the general problem you will get only a general answer. Example: "How to build a house?" , "Use blocks and cement, build solid walls". Instead ask something specific and responsive in a useful way: "How to lift a wall using this type of block with such a slope and such height safely?" , answer: "Position the blocks in such format, run this block placement algorithm, do not use this tool because there is such a risk, here is an example running from a wall ready for you to see how it does [link]". See? Too many wide questions don’t help.
– Sorack
There are several libs/frameworks for this, you can start by taking a look at Axios: > http://codeheaven.io/how-to-use-axios-as-your-http-client-pt/ check the item "Using Next in Browser", if you are not using something like Vue/React
– Fabio Nogueira
@Verônicaemschermann, is missing the front u.u
– Jonathan de Toni
The link @Andersoncarloswoss explains what is the minimum necessary for those who will work with WEB, not only website, but any application that communicates, many programs become bad because people do not understand the least of this and end up getting lost in the way. To create the Rest vc has to have a local server or a server hosted on the web (in the end it will be hosted) to serve the data, this is server-side, where you will find your web-API (Rest)
– Guilherme Nascimento