# Issue: Heroku as webhost and uploading mongo

**URL:** <https://forum.freecodecamp.org/t/issue-heroku-as-webhost-and-uploading-mongo/25497>\
**Category:** I Built This\
**Created:** [August 4, 2016, 10:46pm UTC](https://forum.freecodecamp.org/t/issue-heroku-as-webhost-and-uploading-mongo/25497 "2016-08-04T22:46:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neotriz](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/neotriz/32/22474_2.png) [@Neotriz](https://forum.freecodecamp.org/u/Neotriz)\
**Post date:** [August 4, 2016, 10:46pm UTC](https://forum.freecodecamp.org/t/issue-heroku-as-webhost-and-uploading-mongo/25497/1 "2016-08-04T22:46:42Z")

</div>

So I am very happy to finally got the hang of this backend business.

Instead of simply outputting a JSON, I decided to add a very simple front-end UI as shown below.

 ![](https://global.discourse-cdn.com/freecodecamp/original/2X/4/4af2df1e9c90d29220f2d1ec0ccebacaf974c628.png)

That being said, I am hard time uploading to heroku, especially dealing with mongo database, as well as how to correctly append the right url link to direct it.

here is what my app.js looks like

> <https://github.com/KenzoM/url-shortener/blob/master/app.js>

where the web host is currently reside in localhost:3000.

How do I change it to be applicable with heroku as webhost?

---

<div class="post-metadata">

**Author:** ![JacksonBates](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jacksonbates/32/123402_2.png) [@JacksonBates](https://forum.freecodecamp.org/u/JacksonBates)\
**Post date:** [August 5, 2016, 12:06am UTC](https://forum.freecodecamp.org/t/issue-heroku-as-webhost-and-uploading-mongo/25497/2 "2016-08-05T00:06:48Z")

</div>

I used mLab to host my Mongo database and linked that up to Heroku.

This wiki entry gives a solid overview of getting started with Heroku and mLab:

> **[How to deploy your MongoDB app to Heroku](https://forum.freecodecamp.org/t/guide-for-using-mongodb-and-deploying-to-heroku/19347)**
>
> In this guide let’s see how to work with MongoDB locally and with mLab for deploying it to Heroku. Alternatively you can also use mLab add-on in Heroku , It is free but it may require your credit card details. So, if you are not intrested in...

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:10pm UTC](https://forum.freecodecamp.org/t/issue-heroku-as-webhost-and-uploading-mongo/25497/3 "2021-06-01T18:10:05Z")

</div>

Closed on June 1, 2021, 6:10pm UTC


