简体   繁体   English

如何部署静态React应用

[英]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.

相关问题 如何将静态 React“应用程序”部署到 Heroku? - How do I deploy a static React "app" to Heroku? 如何在静态服务器上部署React应用程序 - How to deploy a react application on a static server 如何在 cPanel 上部署 React 应用程序? - How to deploy a react app on cPanel? 如何在 AWS Elastic Beanstalk 上使用 Nginx、React、Webpack、Gunicorn、PostgreSQL、Django 和 DRF 部署应用程序? 如何使用此应用程序处理静态文件? - How to deploy app with Nginx, React, Webpack, Gunicorn, PostgreSQL, Django & DRF on AWS Elastic Beanstalk? How to handle static files with this app? 如何使用 basepath + nginx 部署 React App - How to deploy a React App with basepath + nginx 如何将 React 应用程序部署到 GitHub Pages - How to deploy a React app to GitHub Pages 如何将 React Web 应用程序部署到 Fiori Launchpad? - How to deploy a React web app to the Fiori Launchpad? 如何部署节点 js 应用程序并对 heroku 做出反应 - How to deploy node js app with react to heroku 如何在数字海洋上部署create react应用程序? - How to deploy create react app on digital ocean? 如何使用 2 个不同的端口部署 React 应用程序 - How to deploy react app with 2 different ports
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM