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
Pavle Coric
10,753 PointsConnecting Web App to Database
Just a general question to prevent me from searching through the tutorials aimlessly, I'm developing a web app for my own use and am having difficulty connecting it to the database that I'm using (MongoDB), are there any tutorials on the topic? I want to be able to access user information, register a new account and display some basic readings from my device. I'm working on a little Internet of Things Project.
1 Answer
Unsubscribed User
501 PointsI am never sure about people how define things, but to make sure in my mind a "web-app" is an application which is running in the browser. However MongoDB is a server side technology to store data, which means you need a server side application which connected to your MongoDB and handle the incoming HTTP requests from your web-app. Summerized: You can not connect your web-app (running in the browser) directly to MongoDB. You need an inbetween point between your browser and your MongoDB database and this thing we call API. (Search for RESTful APIs)
Check this diaram and you will understand: https://cask.scotch.io/2013/11/mean.jpg