Skip to content
This repository was archived by the owner on Apr 11, 2019. It is now read-only.

Commit 31e5d60

Browse files
authored
Update README.md
1 parent b066caf commit 31e5d60

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![Scalable Boilerplate Logo](https://github.com/RyanCCollins/cdn/blob/master/alumni-webapp/scalable-boilerplate-logo.png?raw=true)
22

33
# NOTE:
4-
It is recommended that you use the server_rendering branch if you are building a production app. This branch also contains Apollo for using this boilerplate with GraphQL colocated queries.
4+
It is recommended that you use the [server_rendering](https://github.com/RyanCCollins/scalable-react-boilerplate/tree/feat_rc_server_rendering) branch if you are building a production app. This branch also contains Apollo for using this boilerplate with GraphQL colocated queries.
55

66
# Scalable React Boilerplate
77
[![npm version](https://badge.fury.io/js/scalable-react-boilerplate.svg)](https://badge.fury.io/js/scalable-react-boilerplate)
@@ -86,6 +86,19 @@ Running `npm run serve:bundle` will set your environment to production and serve
8686

8787
NOTE: the deployment script, `npm run deploy`, will place all your generated assets in the `server/public` folder, where they can be served in production.
8888

89+
To deploy with server-rendering, there is one small thing you will need to do. After your run the deploy script, go into the `server/app.js` file and add the hashes for your main javascript and css bundles as shown below.
90+
91+
```
92+
const html = (
93+
<Html
94+
content={content}
95+
scriptHash="f5a35ab068d111293b63"
96+
cssHash="6cf439ec56ba2b8700ce1665ebe17a68"
97+
state={{ data: context.store.getState().apollo.data }}
98+
/>
99+
);
100+
```
101+
89102
## File Structure
90103
* Some files left out for brevity. Please reference the files in the [Scalable React Boilerplate](https://github.com/RyanCCollins/feature-first-react-boilerplate) project for an example of the file structure. The application will ultimately be in use in a production web application project and more info will be posted here when we have production level examples.
91104
```

0 commit comments

Comments
 (0)