Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSaud Tauqeer
Courses Plus Student 8,099 Pointscreate-react-app server runs on node?
so far we have worked on express/node based apps. what kind of server a npx create-react-app runs?
2 Answers
Zack Jackson
30,220 PointsFor development purposes, I believe React utilizes webpack to serve to the local host. Once your app is production ready, you can use whatever backend you want to use to connect to the React front-end. Remember from the first course that React is a front-end library that handles the client-side UI. Just like if you were to build a simle static site, the HTML/CSS front end doesn't really care which language you use to connect to it on the backend.
Eric M
11,546 PointsI'm no expert, but my understading is that In development mode, while building the react app on your local machine, create-react-app uses node for a few things.
The finished react app you create from the bootstrap provided by create-react-app though can run with any server, it doesn't need node.
From the create-react-app docs:
Create React App is agnostic of the backend, and just produces static HTML/JS/CSS bundles.