Search code examples
reactjscreate-react-app

Is it a bad to run create-react-app in production with "npm run start"?


The title says it all. It can be a web server and BrowserRouter is easy to use, shouldn't I just use it as is or something?


Solution

  • CRA or create-react-app was made for begginers, and the development environment as such, all the real time building will throw error at the client screen, and it will not be able to handle load very well.

    You can use npm run start, but i recommend creating the build npm run build and hosting the build folder.

    If you are using github pages for your production i can provide you an action for that purpose specifically, every time you do a pull request or merge.