-
Notifications
You must be signed in to change notification settings - Fork 48.7k
[docs] Talk about running a server in tutorial #2824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -379,7 +385,7 @@ When the component is first created, we want to GET some JSON from the server an | |||
|
|||
We'll use jQuery to help make an asynchronous request to the server. | |||
|
|||
Note: because this is becoming an AJAX application you'll need to develop your app using a web server rather than as a file sitting on your file system. The easiest way to do this is to run `python -m SimpleHTTPServer` in your application's directory. | |||
Note: because this is becoming an AJAX application you'll need to develop your app using a web server rather than as a file sitting on your file system. [As mentioned above](#running-a-server), we have provided serveral servers you can use [on GitHub](https://github.com/reactjs/react-tutorial/). The provide the functionality you need for the rest of this tutorial. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The provide" typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, fixed.
We've talked about this a few times and even half done it. This is for real.
9280bff
to
8babd0a
Compare
Anybody have objections? @spicyj? |
Seems reasonable. Did you test that loading the first parts from a file: URL works properly in Firefox and Chrome and Safari? I imagine it would since we're not doing anything fancy but it can't hurt to check. |
[docs] Talk about running a server in tutorial
[docs] Talk about running a server in tutorial
Awesome, there's been a few stackoverflow questions about this. But I'd much rather see '/api/comments' than 'comments.json', which indicates a static file – this confused me when going through the tutorial initially. Aside from that, I've noticed a lot of people taking the tutorial as 'the way things are done', so not sure how to clarify this, but some mention of moving the |
Yea, I guess moving it to Per the $.ajax bit, meh. I think it's ok and reduces the number of things that needed to be learned right away. It might be good to have an "advanced" tutorial which goes back through and talks about more topics like mixins, data stores. Overall we probably need a best practices section and should talk about architecture a bit but I don't know the right place. |
We've talked about this a few times and even half done it. This is for real.
I also changed the name of the html file to be
index.html
(that's what's in the tutorial repo)See also #2004, #2739, #800 (eh, not totally but I want to close it), reactjs/react-tutorial#1 and surely some others.