From the course: React: Building Progressive Web Apps (PWAs)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Run a build - React.js Tutorial
From the course: React: Building Progressive Web Apps (PWAs)
Run a build
- [Narrator] Now that we have the serve packages installed, we can run a build and we can serve it up on a local port. Let's go ahead and run the build. I'm going to say NPM run build. This is going to bundle react in production mode and it's going to optimize the build for the best performance. So it's minified, and there are all sorts of different chunks that represent different parts of our application, that will help with performance. So this thing is ready to be deployed. Now this is saying the build folder is ready to be deployed. You can serve it with a static server. This is using that serve command which we installed, so let's go ahead an do it. We'll say serve dash S build. So this says that this is running on local host 5000. You can open this up in your browser, instead of local host 3000, we'll go to local host 5000, and you'll notice a couple things right away. Thing one, is that we see that this page is using the production build of React which is a good thing, and if…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.