I'm working in a react-js project and I have a cloud server which has installed apache server. My question is could I set my react-project on apache server?.
-
3React.js is principally a browser-based technology. And as such the type of server does not make a difference. If you want to server side render in node.js, then you could still proxy through apache. So, I don't see any limit there.Davin Tryon– Davin Tryon2016-08-19 18:54:52 +00:00Commented Aug 19, 2016 at 18:54
-
for React router 4. see it may helpAbdul Moiz– Abdul Moiz2018-09-22 17:12:52 +00:00Commented Sep 22, 2018 at 17:12
-
This might help you: stackoverflow.com/questions/42461279/…Aftab22– Aftab222019-04-16 05:02:29 +00:00Commented Apr 16, 2019 at 5:02
Add a comment
|
3 Answers
You must change apache config file with code
<VirtualHost *:80> DocumentRoot/Users/Your User Name/Sites/ <Directory"/Users/Your User Name/Sites/"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost>
1 Comment
Miodrag Trajanovic
That because Apache server work on port 80, but node and express work default on port 3000. For that is need this and other settings, how you can get proximity for showing node-react app. Or make react application without use node.
No you can't set your project on apache server. I think you have to use Docker for such type of thing.
Does that make sense? React is just a front end library, which is used for making reusable UI components.
1 Comment
Julha
Yes, you can. As you say, React.js is just a javascript view library (like jQuery, Angular ...etc), an Apache server is made to serve ressources to client (ressources like HTML, CSS, JS). After the client have receive this files/data, his browser is able to compile them and show him the page he want to see.