reactjs/react-tutorial

POST not updating comments.json on Apache server

Mark-L6n opened this issue · 4 comments

I'm using a local dev environment (Vagrant box with CentOS + Apache) to run the tutorial, and the POST isn't updating file comments.json.
If running the tutorial this way, is this not possible, or is there a server script that needs to be added to update file comments.json?
Thanks!

zpao commented

Please read the readme, it discusses the need for running a server and there are several available in a variety of languages.

Hi—Thanks for responding! I did read the readme, and as you can see from the question, I am running a server (Apache). I'm guessing from your response, though, that the answer to my question is: no, it's not possible to run the tutorial as-is on an Apache server, and that one of your provided scripts needs to act as the server.

zpao commented

Sorry for the curt response (mobile, on vacation), I meant that a scripted server is needed. POSTing to a file won't work so we need to handle that request and send back the updated data. Maybe Apache provides a more robust scripting capability than I know. Usually it's Apache + .

OK, thanks for responding while on vacation!
Edit: This post shows how to use the tutorial with an apache server.