Skip to content

Instantly share code, notes, and snippets.

@diurivj
Last active August 11, 2023 10:12
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diurivj/15954d82d12598825b76976e7a0050c8 to your computer and use it in GitHub Desktop.
Save diurivj/15954d82d12598825b76976e7a0050c8 to your computer and use it in GitHub Desktop.
STEPS FOR DEPLOYING THE FULL STACK PROJECT.

Backend

  1. Change the .env file:
FRONTENDPOINT=yourproductionendpointforthefrontend(netlify)
  1. Initialize git, commit your changes and push to heroku:
$ git init 
$ git add .
$ git commit -m 'Finally'
$ heroku create thenameofyourproject
$ git push heroku master
  1. Done!

Frontend

‼️ Important ‼️

‼️ You have to change all the development endpoints to the production endpoints ‼️

  1. Go to your frontend directory and run the next command:
$ yarn build
  1. Go to the build directory and create the _redirects file:
$ cd build/
$ touch _redirects
  1. Write the next line in the _redirects file:
/*    /index.html   200
  1. Drag the build directory into Netlify

  2. Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment