Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Krystal Jackson
8,598 PointsNot clear on how to use mongo in an actual live webpage.
I'm one part away from completing the Javascript track and still don't comprehend how to actual use mongo with a webpage.
Lets say I built a website (www,krysjj.com) and was hosting it through a hosting site like GoDaddy.com. How do I connect to mongo all I've seen is how to use it in the command line I'm not comprehending how it will work on a webpage.
It hard to put into words what I'm trying to ask but when you create a SQL database you can see it, you know where it is but where is the mongo database being saved to?
2 Answers

Kevin Korte
28,149 PointsI don't think godaddy supports mongo to my knowledge, so you'd have to host your mongo database on another service, and refrerence the location and credentials to it in your code.
There are 3 big players for mongodb hosting

Nathan Dalbec
17,111 PointsExcuse me if I'm misinterpreting what you are asking. MongoDB doesn't live in the browser on a webpage, it lives in a server. So to connect a web page to a Mongo database, you'll want to build a REST API (see: Build a REST API With Express), get the REST API app hosted on a service that supposts MongoDB, and then send requests from your webpage to the REST API (see: AJAX Basics)