Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deploy it to Heroku? #1

Open
hrichiksite opened this issue Jun 2, 2020 · 4 comments
Open

How to deploy it to Heroku? #1

hrichiksite opened this issue Jun 2, 2020 · 4 comments

Comments

@hrichiksite
Copy link

No description provided.

@ChaimF90
Copy link
Collaborator

ChaimF90 commented Jun 2, 2020

This video will help you with deploying to heroku https://youtu.be/RQcWKcMa_Jc

@hrichiksite
Copy link
Author

hrichiksite commented Jun 3, 2020

Thank You @ChaimF90 but I had a question that where did you deploy after making your project ??
And can you give me a link for a live demo?

I mean a working website

@vcaruso0923
Copy link

vcaruso0923 commented Nov 3, 2020

Thank you so much Chaim for creating this tutorial! It was immensely helpful to me in creating a group project for a class I was taking. I was able to get this app deployed to Heroku with some effort. See my repository here: video-chatter-2-2

A few things to note that are different from Chaim's code:

  1. The server.js is the most different from Chaim's code (albeit not that different). Added app.use and app.get to serve up the static build folder/index.html. Removed http - see the code linked above.
  2. Chaim's code uses both yarn.lock and package-lock. Heroku doesn't like this, so you have to convert one to the other (my code uses yarn.lock)
  3. This is the big one that was hard to find, but is important. Remove the build folder from the .gitignore file in the /client folder. Then navigate to the index.html in the build folder. You have to change the relative paths of the manifest.json and the chunk.js files to be absolute paths. For me, it meant changing this:
    <link rel="manifest" href="./manifest.json" />
    <script src="./static/js/2.15e53199.chunk.js"></script>
    <script src="./static/js/main.438db088.chunk.js"></script>
    to this (remove periods at start of file path):
    <link rel="manifest" href="/manifest.json" />
    <script src="/static/js/2.15e53199.chunk.js"></script>
    <script src="/static/js/main.438db088.chunk.js"></script>

@hrichiksite
Copy link
Author

Thanks a lot, this will help me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants