DEV Community

Cover image for How to Set up a Node.js Express Server for React

How to Set up a Node.js Express Server for React

Pratham on July 25, 2021

React is a JavaScript library used to build user interfaces and develop single-page applications using reusable UI components. React is used for bu...
Collapse
 
sm0ke profile image
Sm0ke • Edited

Thanks for writing!
Another useful oss sample might be this one:

React Node JS Datta Able

Product has also JWT authentication and a simple Node JS backend written in Typescript / Express / SQLite TypeORM.

Collapse
 
jpgerber1986 profile image
Jordan P Gerber

For newer people (like myself) - it may be beneficial to add some information on sending a request to the API:

fetch('/api', {
method: 'POST',
body: '', // Data to send to the API
headers: {
'Content-type': '' // The type of data you're sending
}
});

Collapse
 
nikhilvaibhav profile image
Nikhil Kumar

So neatly and precisely written. This was helpful.

Collapse
 
pratham10 profile image
Pratham

Thank you so much.

Collapse
 
bam92 profile image
Abel Lifaefi Mbula

Nice posts. I've published a post on how to setup Nodejs for local dev env.

Collapse
 
noahb profile image
Traziiex

Beautiful content ! Thanks a lot šŸ˜„

 
pratham10 profile image
Pratham

You can check this in my Github repository
github.com/bhagatpratham/react-nod...

Collapse
 
pratham10 profile image
Pratham

I can't understand your query, can you explain in simple words.
I'm also a beginner don't worry and correct me if I'm wrong
I just share what I learn šŸ’œ

Collapse
 
nirajbadaik profile image
NirajBadaik

He wants to know the folder structure of your project. Some times it may create confusion about which folder goes where.A screen short of the vs code explorer tab will do.

Thread Thread
 
pratham10 profile image
Pratham

It's in my Github repo
github.com/bhagatpratham/react-nod...

 
nirajbadaik profile image
NirajBadaik

You may find this helpful.
github.com/gitdacode/express-react...

Collapse
 
jcyber101 profile image
_jcyber

Great post! This was very simple and straight forward. I knew exactly what was going on with each step. Great job once again and keep up the good work. I look forward to reading more of your post.

Collapse
 
pratham10 profile image
Pratham

Thank you