score:0

react apps built using create-react-app will only run when served using http.

you can try npx http-server in your build folder and visit localhost:8080

score:0

you can make an index.html like this:

<html>
  <body>
  <div id="root"></div>
  </body>
  <script type="text/javascript" src="bundle.js"></script>
</html> 

actually this is the real way you do it when you build your app for production and want it to serve. the method @aghardeshir has suggested is for development purpose. once your build is ready, you can serve it through a local server(like node or xampp) or just test it by opening it in a browser.


Related Query

More Query from same tag