title: How to deploy a Golang/mongodb/react app on heroku?
body: <p>I am trying to figure out how to deploy a Golang/mongodb/react app on heroku, but I have never done it so I am kind of clueless on how to do it. I have made its own project and added the config vars that are on my .env, it has a heroku/go buildpack, but every time I do</p>
  <blockquote>
  <p>git push heroku main</p>
  </blockquote>
  <p>I get this on the terminal:</p>
  <pre><code>Enumerating objects: 788, done.
  Counting objects: 100% (788/788), done.
  Delta compression using up to 8 threads
  Compressing objects: 100% (728/728), done.
  Writing objects: 100% (775/775), 2.16 MiB | 779.00 KiB/s, done.
  Total 775 (delta 395), reused 0 (delta 0), pack-reused 0
  remote: Compressing source files... done.
  remote: Building source:
  remote: 
  remote: -----&gt; Building on the Heroku-20 stack
  remote: -----&gt; Using buildpack: heroku/go
  remote: -----&gt; Go app detected
  remote: -----&gt; Fetching stdlib.sh.v8... done
  remote: -----&gt; 
  remote:        Detected go modules via go.mod
  remote: -----&gt; 
  </code></pre>
  <p>I don't think it is giving me an error there, but if I click on open-app from heroku I get an Application error message and asks me to use
  <em>heroku logs --tail</em></p>
  <p>And it shows me a bunch of these lines which I can't really understand:</p>
  <pre><code>2021-10-08T15:00:03.362868+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=OPTIONS path=&quot;/profile?id=615affc23cc365e3ac6cee23&quot; host=twitter-clone-jeff.herokuapp.com request_id=58a7c915-4543-4105-95f2-063604a6e7c8 fwd=&quot;108.215.249.255&quot; dyno= connect= service= status=503 bytes= protocol=https
  2021-10-08T15:00:03.464879+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=OPTIONS path=&quot;/profile?id=615affc23cc365e3ac6cee23&quot; host=twitter-clone-jeff.herokuapp.com request_id=2f1e17e0-3c38-4d4b-9e34-5e4a8f27afcd fwd=&quot;108.215.249.255&quot; dyno= connect= service= status=503 bytes= protocol=https
  </code></pre>
  <p>And it finally shows me this:</p>
  <pre><code>037bc7735b fwd=&quot;108.215.249.255&quot; dyno= connect= service= status=503 bytes= protocol=https
  2021-10-08T15:13:02.688268+00:00 app[api]: Set MONGO_PASSWORD config vars by user jeffersongarcia1599@gmail.com
  2021-10-08T15:13:02.688268+00:00 app[api]: Release v7 created by user jeffersongarcia1599@gmail.com
  2021-10-08T15:13:02.943260+00:00 heroku[web.1]: State changed from crashed to starting
  2021-10-08T15:13:03.660069+00:00 heroku[web.1]: Starting process with command `bin/Twitter-Clone`
  2021-10-08T15:13:04.507378+00:00 app[web.1]: 2021/10/08 15:13:04 Error loaging your .env file
  2021-10-08T15:13:04.624983+00:00 heroku[web.1]: Process exited with status 1
  2021-10-08T15:13:04.678311+00:00 heroku[web.1]: State changed from starting to crashed
  2021-10-08T15:13:16.067630+00:00 app[api]: Set MY_SECRET config vars by user jeffersongarcia1599@gmail.com
  2021-10-08T15:13:16.067630+00:00 app[api]: Release v8 created by user jeffersongarcia1599@gmail.com
  2021-10-08T15:13:16.408304+00:00 heroku[web.1]: State changed from crashed to starting
  2021-10-08T15:13:17.103362+00:00 heroku[web.1]: Starting process with command `bin/Twitter-Clone`
  2021-10-08T15:13:18.191933+00:00 app[web.1]: 2021/10/08 15:13:18 Error loaging your .env file
  2021-10-08T15:13:18.347637+00:00 heroku[web.1]: Process exited with status 1
  2021-10-08T15:13:18.402108+00:00 heroku[web.1]: State changed from starting to crashed
  2021-10-08T15:13:35.119252+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/&quot; host=twitter-clone-jeff.herokuapp.com request_id=133bbf4e-3dcc-44ab-ad9b-2d301868c166 fwd=&quot;108.215.249.255&quot; dyno= connect= service= status=503 bytes= protocol=https
  2021-10-08T15:20:10.885717+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/&quot; host=twitter-clone-jeff.herokuapp.com request_id=ac8ed7a8-1137-45b8-952d-3ecea81ee645 fwd=&quot;108.215.249.255&quot; dyno= connect= service= status=503 bytes= protocol=https
  2021-10-08T15:30:38.792946+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/&quot; host=twitter-clone-jeff.herokuapp.com request_id=fb4bc339-5b4b-4ae2-896d-9f07f87cc16d fwd=&quot;108.215.249.255&quot; dyno= connect= service= status=503 bytes= protocol=https
  </code></pre>
  <p>Any help would be appreciated as I am honestly clueless since the <em><strong>git push heroku main</strong></em> does not really show any errors. I know that for Postgress databases there is like a <em><strong>Heroku Postgres</strong></em> add on, but I don't if there is a Mongo one. I have a SECRET_KEY and MONGO_PASSWORD on a .env but I also put them on the config vars. Thanks in advance! My repo in case necessary</p>
  <p><a href="https://github.com/JeffersonGarcia15/Twitter-Clone" rel="nofollow noreferrer">https://github.com/JeffersonGarcia15/Twitter-Clone</a></p>