This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Server Side Rendering based on routes matched by React-router. | |
app.use((req, res) => { | |
match({ routes, location: req.url }, (err, redirectLocation, renderProps) => { | |
if (err) { | |
return res.status(500).end('Internal server error'); | |
} | |
if (!renderProps) { | |
return res.status(404).end('Not found!'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In Gemfile, add the following line to specify 'bootstrap-sass' gem. I am using version 3.2.0.0. | |
gem 'bootstrap-sass', '3.2.0.0' | |
# After adding this line, install this gem by runing this command in your terminal- "bundle install" | |
# Now we have the gem installed. We need to add this to our asset pipeline in order to use bootstrap. To do so, create a new file in | |
# app/assets/stylesheets/ folder named "custom.css.scss", Or you can also rename "application.css" to "application.css.scss". | |
# see the next file in gist named "custom.css.scss" to see what goes there. |