Skip to content

Commit

Permalink
Break up long lines in the generated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-wade committed May 30, 2016
1 parent 0db4444 commit 173d003
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions packages/generator-react-server/generators/app/templates/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# react-server-examples/hello-world

Very simple example project for `react-server` which only shows server rendering and interactivity on the client side.
Very simple example project for `react-server` which only shows server rendering
and interactivity on the client side.

To start in development mode:

```shell
npm start
```

Then go to [localhost:3000](http://localhost:3000/). You will see a simple page that pre-renders and that is interactive on load. It also will include hot reloading of React components in their own file.
Then go to [localhost:3000](http://localhost:3000/). You will see a simple page
that pre-renders and that is interactive on load. It also will include hot
reloading of React components in their own file.

If you want to optimize the client code at the expense of startup time, type `NODE_ENV=production npm start`. You can also use any of [the other arguments for react-server-cli](../../react-server-cli#setting-options-manually) after `--`. For example:
If you want to optimize the client code at the expense of startup time, type
`NODE_ENV=production npm start`. You can also use any
[react-server-cli arguments](../../react-server-cli#setting-options-manually)
after `--`. For example:

```shell
# start in dev mode on port 4000
Expand All @@ -19,12 +25,15 @@ npm start -- --port=4000

# Developing using Docker and Docker Compose

These steps assume you are familiar with docker and already have it installed. Some basics:
These steps assume you are familiar with docker and already have it installed.
Some basics:

1. Download [Docker Toolbox](https://www.docker.com/products/docker-toolbox) and install it.
1. Download [Docker Toolbox](https://www.docker.com/products/docker-toolbox) and
install it.
2. Start `docker quick start shell`
3. Navigate to where you generated the project
4. Add a configuration to set the `host` option to the ip given by `docker-machine ip`. An example configuration might be like:
4. Add a configuration to set the `host` option to the ip given by
`docker-machine ip`. An example configuration might be like:
```json
{
"port": "3000",
Expand Down Expand Up @@ -55,11 +64,14 @@ To clean up, run the following commands:
docker-compose stop
docker-compose rm --all
docker volume ls # and get the name of the volume ending in react_server_node_modules
docker volume rm _react_server_node_modules # this name will be different depending on the name of the project
# this name will be different depending on the name of the project
docker volume rm _react_server_node_modules
```

The configuration included stores the node_modules directory in a "named volume". This is a special
persistent data-store that Docker uses to keep around the node_modules directory so that they don't have to
be built on each run of the container. If you need to get into the container in order to investigate what
is in the volume, you can run `docker-compose exec react_server bash` which will open a shell in the
container. Be aware that the exec functionality doesn't exist in Windows (as of this writing).
The configuration included stores the node_modules directory in a "named volume".
This is a special persistent data-store that Docker uses to keep around the
node_modules directory so that they don't have to be built on each run of the
container. If you need to get into the container in order to investigate what
is in the volume, you can run `docker-compose exec react_server bash` which will
open a shell in the container. Be aware that the exec functionality doesn't
exist in Windows (as of this writing).

0 comments on commit 173d003

Please sign in to comment.