Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pelatge/817b8cc2227ebb9066efa4c9174c8240 to your computer and use it in GitHub Desktop.
Save pelatge/817b8cc2227ebb9066efa4c9174c8240 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