[英]How do I prepare a CRA app to deploy to heroku, do I still have to build as for a fullstack CRA app?
I have a simple create-react-app app that I want to deploy to heroku but I'm not sure about the right wat to deplay or what files exactly.我有一个简单的 create-react-app 应用程序,我想将它部署到 heroku 但我不确定要播放的正确 wat 或确切的文件。 Do I need to
npm run build
as in the case of a mern fullstack app?我是否需要
npm run build
,就像 mern 全栈应用程序一样? I repeat, this is only react, no server.我再说一遍,这只是反应,没有服务器。 Thank you.
谢谢你。
Instead of using Heroku to deploy just the React part, no server, you can use other easier solutions like: Netlify and Vercel .除了使用 Heroku 来部署 React 部分,没有服务器,您可以使用其他更简单的解决方案,例如: Netlify和Vercel 。
What you need need to do that, is just have a GitHub/GitLab repository, register on the platform, choose your repository and wait:)你需要做的只是拥有一个 GitHub/GitLab 存储库,在平台上注册,选择你的存储库并等待:)
It will automatically build and serve your React application.它将自动构建和服务您的 React 应用程序。
Another cool thing is: Any new commit will generate a new build, so your app will be always updated.另一个很酷的事情是:任何新的提交都会生成一个新的构建,因此您的应用程序将始终更新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.