简体   繁体   English

ReactJS生产部署

[英]ReactJS Production Deployment

I currently have production web app (PHP+AngularJS) & Java/Spring backend. 我目前有生产Web应用程序(PHP + AngularJS)和Java / Spring后端。 Basically it is a web app making lots and lots of REST Api calls to Java backend and rendering that data on web forms. 基本上,这是一个Web应用程序,它对Java后端进行了大量的REST Api调用,并将这些数据呈现在Web表单上。 I use Apache Web 2.0 to host the frontend and Tomcat for the backend 我使用Apache Web 2.0承载前端,并使用Tomcat承载后端

Planning to migrate to ReactJS, Java/Spring will still be the backend. 计划迁移到ReactJS,Java / Spring仍将是后端。 I need some guidance on following 我需要以下指导

  1. Best Web Server to use to deploy React (Build/Deploy controlled through CD/CI, Jenkins) 用来部署React的最佳Web服务器(通过CD / CI,Jenkins控制构建/部署)
  2. Any specific frameworks and/or components that needs to be added and installed to support this web app. 需要添加和安装以支持此Web应用程序的任何特定框架和/或组件。
  3. Best Testing framework to use for React which will work with the CI/CD pipeline. 用于React的最佳测试框架,可与CI / CD管道一起使用。
  4. Can all this be containerized (docker/kubernetes) ? 是否可以将所有这些容器化(docker / kubernetes)?

Thanks in advance 提前致谢

  1. Any server that servers static files (express, apacha, nginx, etc) can handle a react app. 任何托管静态文件(express,apacha,nginx等)的服务器都可以处理react应用。
  2. You'll need webpack to build the project (transpile/minify/optimise) 您将需要webpack来构建项目(转换/最小化/优化)
  3. You'll need a test runner (i suggest jest from facebook) and a library to test/render you application on each unit test. 您将需要一个测试运行程序(我建议从Facebook开个玩笑)和一个库来测试/呈现每个单元测试中的应用程序。 Use react-testing-library (simple, dynamic and easy to use). 使用react-testing-library (简单,动态和易于使用)。
  4. Totally! 完全!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM