reactjs/react-tutorial

server.rb does not reload comments.json

Closed this issue · 4 comments

The tutorial states that the file _comments.json will be reloaded with each request for '/comments.json'. However, server.rb only loads this file once before webbrick is started. Moving the loading and parsing of _comments.js into the block server.mount_proc '/comments.json' solves the problem.

Im having the same problem. I have to restart the server to get any changes to the _comments.json to take effect. I have tried using server.rb and server.js and its the same issue with both.

We figured out what the problem was and will push a fix soon.

Hooray! Glad I checked here. I was wondering what I was doing wrong.

zpao commented

Fixed in all of the servers. Thanks for getting this started!