How to deploy a React App on Apache web server

后端 未结 8 2151
谎友^
谎友^ 2020-11-29 18:11

I have created a basic React App from https://www.tutorialspoint.com/reactjs/reactjs_jsx.htm here , I want to run this test code on Apache based server, I know that I need t

8条回答
  •  死守一世寂寞
    2020-11-29 18:49

    As said in the post, React is a browser based technology. It only renders a view in an HTML document.

    To be able to have access to your "React App", you need to:

    1. Bundle your React app in a bundle
    2. Have Apache pointing to your html file in your server, and allowing access externally.

    You might have all the informations here: https://httpd.apache.org/docs/trunk/getting-started.html for the Apache server, and here to make your javascript bundle https://www.codementor.io/tamizhvendan/beginner-guide-setup-reactjs-environment-npm-babel-6-webpack-du107r9zr

提交回复
热议问题