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!

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 trial

JavaScript React Components (2018) Build Modular Interfaces with Components Setting up with Create React App

create-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
Zack Jackson
30,220 Points

For 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
Eric M
11,543 Points

I'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.