Forked from kurtzilla/gist:c134c74142ce59d0bdf2d90db7321dcb
Created
May 11, 2017 10:39
-
-
Save saniko/2a3149078bc14749da3260c8ac943465 to your computer and use it in GitHub Desktop.
Deploy react-universally to Heroku from start to finish
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
fork/clone master branch: [email protected]:ctrlplusb/react-universally.git | |
cd [your-repo] | |
npm install | |
touch .slugignore | |
echo yarn.lock >> .slugignore | |
edit config/index.js | |
change line 23: | |
port: getIntEnvVar('SERVER_PORT', 1337), | |
to: | |
port: getIntEnvVar('PORT', 1337), | |
edit ./package.json | |
add to scripts: | |
"postinstall": "npm run build" | |
edit ./src/server/index.js | |
change line 55: | |
const listener = app.listen(config.port, config.host, () => | |
to: | |
const listener = app.listen(config.port, () => | |
create Heroku app: | |
heroku create [my-heroku-app] | |
heroku config:set NPM_CONFIG_PRODUCTION=false | |
git add . | |
git commit -m 'deploying to heroku' | |
git push heroku master | |
heroku open | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment