[英]How to deploy a static React app
I'm hoping you can point me in the right direction for finding out how to deploy a static single page react app to my server. 我希望您能指出正确的方向,以了解如何将静态单页React应用程序部署到我的服务器。 Nothing fancy, no routing, no database--imagine a simple 'hello world' page. 没有幻想,没有路由,没有数据库-想象一个简单的“ hello world”页面。 What do I need to do to get the react goodness into static files I can upload to my server? 我需要怎么做才能将反应优势转化为可以上传到服务器的静态文件? Thanks! 谢谢!
Here's a great boilerplate to get started. 这是一个很好的入门样板。 This will deploy to heroku no problem. 这将部署到heroku没问题。 https://github.com/alanbsmith/react-node-example Also checkout the react docs facebook.github.io/react/docs/getting-started.html https://github.com/alanbsmith/react-node-example也请查看react docs facebook.github.io/react/docs/getting-started.html
Basically if using ES6 or JSX you do your build first, then deploy. 基本上,如果使用ES6或JSX,则首先进行构建,然后进行部署。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.