Created
March 11, 2019 13:41
-
-
Save moafzalmulla/47b329411ef2131622e5945ac7e17fe1 to your computer and use it in GitHub Desktop.
Deploying Gatsby to Heroku
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
//package.json | |
//add new section for engines | |
"engines": { | |
"node": "^8.0.0", | |
"yarn": "^1.2.1" | |
}, | |
//add 2 new functions to scripts | |
"scripts": { | |
"heroku-postbuild": "gatsby build", | |
"start": "gatsby serve" | |
} | |
//Procfile | |
web: yarn start -- --port ${PORT?} | |
/*source | |
- https://github.com/mickeyreiss/gatsby-on-heroku | |
- https://github.com/gatsbyjs/gatsby/issues/2836#issuecomment-343032393 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment