Skip to content

Commit 47f8739

Browse files
committed
Update README
1 parent 2b73f97 commit 47f8739

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,31 @@
33
[npm-badge]: https://img.shields.io/npm/v/react-stdio.svg?style=flat-square
44
[npm]: https://www.npmjs.org/package/react-stdio
55

6-
[react-stdio](https://github.com/mjackson/react-stdio) lets you render [React](https://facebook.github.io/react/) components on the server, regardless of the backend technology you're using.
6+
[react-stdio](https://github.com/ReactTraining/react-stdio) lets you render [React](https://reactjs.org/) components on the server, regardless of the backend technology you're using.
77

88
As its name suggests, other processes communicate with react-stdio using standard streams. The protocol is JSON, so any environment that can spawn a child process and write JSON to its stdin can use the server. Requests are handled serially, so responses are issued in the same order requests are received.
99

1010
## Installation
1111

12-
Using [npm](https://npmjs.com):
12+
If you have node installed, you can install using npm:
1313

1414
$ npm install -g react-stdio
1515

16+
This will put the `react-stdio` executable in your [`npm bin`](https://docs.npmjs.com/cli/bin).
17+
18+
If you don't have node installed, you can download the executable for your architecture from [the releases page](https://github.com/ReactTraining/react-stdio/releases).
19+
1620
## Usage
1721

18-
Once you've installed the server, you will have a `react-stdio` binary available (assuming `node_modules/.bin` is in your `$PATH`). Execute it to start the server.
22+
After installation, execute `react-stdio` to start the server.
1923

2024
To render a React component, write a JSON blob to stdin with any of the following properties:
2125

2226
component The path to a file that exports a React component (required)
2327
props Any props you want to pass to the component (optional, default is {})
2428
render The type of rendering (optional, default is renderToString)
2529

26-
If the request is successful, the server will put a JSON blob with `{"html":"..."}` on stdout. If the request fails for some reason, the JSON will have an `error` property instead of `html`.
30+
If the request is successful, the server will put a JSON blob with `{"html":"...","context":...}` on stdout. If the request fails for some reason, the JSON will have an `error` property instead of `html`.
2731

2832
Example:
2933

@@ -47,7 +51,7 @@ Also, since react-stdio uses the `stdout` stream for all program output, all wri
4751

4852
## Integrations
4953

50-
- [Elixir/Phoenix](http://blog.overstuffedgorilla.com/render-react-with-phoenix/)
51-
- [Ruby on Rails](https://github.com/aaronvb/rails_react_stdio)
54+
* [Elixir/Phoenix](http://blog.overstuffedgorilla.com/render-react-with-phoenix/)
55+
* [Ruby on Rails](https://github.com/aaronvb/rails_react_stdio)
5256

5357
If you'd like to add an integration here, please submit a PR.

0 commit comments

Comments
 (0)