DEV Community

Himanshu Gupta
Himanshu Gupta

Posted on

How to Run React JS Build Locally

You have to install server package then you can run reactjs build into your pc.



npm install -g serve
# Or if you're using Yarn
yarn global add serve


Enter fullscreen mode Exit fullscreen mode

All that’s left to do is tell serve the package which folder you want to serve. Assuming you're inside your project directory. You'd run a command like this.

serve build
And you should see the following output, specifying where your React app is being served.

Image description

Top comments (2)

Collapse
 
armanebrahimi profile image
Arman

Thanks:)

Collapse
 
himanshudevgupta profile image
Himanshu Gupta

Your welcome