Skip to content

Instantly share code, notes, and snippets.

@moafzalmulla
Created March 11, 2019 13:41
Show Gist options
  • Save moafzalmulla/47b329411ef2131622e5945ac7e17fe1 to your computer and use it in GitHub Desktop.
Save moafzalmulla/47b329411ef2131622e5945ac7e17fe1 to your computer and use it in GitHub Desktop.
Deploying Gatsby to Heroku
//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