Skip to content

Commit

Permalink
Merge 7e78ae4 into e6fa8c4
Browse files Browse the repository at this point in the history
  • Loading branch information
modosc committed Mar 28, 2016
2 parents e6fa8c4 + 7e78ae4 commit 5f6aa30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions docs/additional-reading/heroku-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ The generator has created the necessary files and gems for deployment to Heroku.
+ `config/puma.rb`: Puma webserver config file
+ `lib/tasks/assets.rake`: This rake task file is provided by the generator regardless of whether the user chose Heroku Deployment as an option. It is highlighted here because it is helpful to understand that this task is what generates your JavaScript bundles in production.

By default Heroku will cache the root `node_modules` directory between deploys but since we're installing in `client/node_modules` you'll need to add the following line to the `package.json` in your root directory (otherwise you'll have to sit through a full `npm install` on each deploy):
```
"cacheDirectories": [
"node_modules",
"client/node_modules"
],
```

## How to Deploy

React on Rails requires both a ruby environment (for Rails) and a Node environment (for Webpack), so you will need to have Heroku use multiple buildpacks.
Expand Down Expand Up @@ -64,6 +73,3 @@ bundle
bin/rake db:migrate
bin/rake db:setup
```



Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
"url": "https://github.com/shakacode/react-webpack-rails-tutorial/issues"
},
"homepage": "https://github.com/shakacode/react-webpack-rails-tutorial",
"dependencies": {}
"dependencies": {},
"cacheDirectories": ["node_modules", "client/node_modules"]
}

0 comments on commit 5f6aa30

Please sign in to comment.