How to give a Node.js file path that should display in React using fetch #7
uttampun44
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Everyone. I am building an e-commerce website in the Mern stack, and I want to display Node.js product data in React using fetching. Everything is working. I don't know how to give an image path in Node.js, and when using the fetching method in React, it should be displayed.
{
id: 9,
productName: "Bree Dry Dog Food",
price: 100,
quantity: 15,
image: 'http://localhost:8080/images/breedfoog.png',
}
I'm using it like this in the image URL. I know. It is not good practice, I know. Can anyone help me? I am not an expert in marketing, but I am building my own project.
Beta Was this translation helpful? Give feedback.
All reactions