DEV Community

Cover image for Setup MongoDB in Node.js with Mongoose

Setup MongoDB in Node.js with Mongoose

Akhila Ariyachandra on May 22, 2019

Chances are if you’re building an application with Node, you’ll be needing to connect it to a MongoDB database. Here I’ll show you how to set it up...
Collapse
 
adamszaloczi profile image
Adam Szaloczi

Nice brief description. As the next step you should join this to a simple basic front end, I would be more than happy to see that. (I know YT is full of MERN , MEAN tuts, but, why not)

Collapse
 
akhilaariyachandra profile image
Akhila Ariyachandra

Thanks for the idea!! I start working a series about creating a notes app with the MERN stack. Note App - Part 1: Setup the Node API

Collapse
 
romanazeem profile image
Roman Azeem

I am just curious about something? Why aren't we using express to connecting with mongoose?

Collapse
 
akhilaariyachandra profile image
Akhila Ariyachandra

This way of connecting the API to the Mongo database can be used with any Node API like Express, Koa, Restify etc... which is why I left out the part of setting up the server.

Collapse
 
romanazeem profile image
Roman Azeem

I got it. Thanks a lot