From the course: Building a React Project with Google Bard and the PalM2 API
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
Getting data from the server - Bard Tutorial
From the course: Building a React Project with Google Bard and the PalM2 API
Getting data from the server
- [Instructor] Let's work on connecting our frontend with our backend. Now if you remember, we have a server that is running at a different location under this /api route. So if we go here, you can see the results of calling this endpoint, but that is actually running on a separate server than our frontend. So we need to be able to send this information from our server into our client, and we're going to do that. Let's take a look though at the fact that I do have that server running. And let's go ahead and actually get out of it. So if I do npm start, and I am in the palm-server folder right now. I have three different terminals. One with the client, one with the server, and then one where I do some additional commands in a clean terminal. So if I do npm start, you can see that it runs on ported 3333. And that's what happens when I do localhost:3333/api. Just in case you perhaps have turned that off. Now in the…