DEV Community

Discussion on: FullStack setup (Node.js, React.js and MongoDB)

Collapse
 
gunduzcihat profile image
Mustafa • Edited

Very confusing documentation.
For example: dev-to-uploads.s3.amazonaws.com/i/...

Which package.json?

Collapse
 
pacheco profile image
Thiago Pacheco

Hi Mustafa, how are you?

I am sorry if that was not that clear, it was my first article so I am still improving it.
But as I said in this part, it is the package.json located in the root of the project, which means the file related to the backend part.

Let me know if I can help you with anything else.

Collapse
 
gunduzcihat profile image
Mustafa

Sorry if I am being rude.

For example, in your doc, you says process.env.MONGODB_URI or process.env.NODE_ENV but all that give errors "undefined"

so what can I do?

Thread Thread
 
pacheco profile image
Thiago Pacheco

Hi Mustafa,

These variables when working on the localhost will be undefined, but that should not trigger errors because there is a checking on each of them applying another value in case they are undefined.

These are the environment variables that can make the app production-ready. For example, the MONGODB_URI will be used as your production mongo URL and the NODE_ENV will be used to render the correct front-end application in case it is set to production.

They are used in the following tutorials (found at the end of the article) about how to dockerize and deploy this app.

Thread Thread
 
gunduzcihat profile image
Mustafa

Thanks for the reply. I have sent the message you via instagram dm. I need more explanations.

Anyway, you said in your doc:
"Now if we run the project we are able to make requests to our simple product api using the url localhost:5000/api/product.
Here we can get, insert, update and delete a product."

But I tried it with postman but it waits too long. nothing returns.

For instance:

localhost:5000/api/product?name=mu...

it says, "sending request..." and it stucks.