(3/5) MongoDB Tutorial: Downloading, Installing, and Basics - MEAN Stack RESTful API Tutorial 3

preview_player
Показать описание
Part 4 of the MEAN Stack RESTful API tutorial: Getting started with MongoDB. A hands on tutorial for downloading, installing, and learning basic commands to use with MongoDB. We will be incorporating data from MongoDB into our RESTful API contact list app.

Рекомендации по теме
Комментарии
Автор

best tutorial I have seen on this topic yet.  Thanks man!!!!

DaMadFish
Автор

This is what I'm finding! Thanks guy! Very helpful XD

mrpx
Автор

Simple and awesome!! Just what I was looking for ... Thanx dawwwgh !!

ahmedmusawir
Автор

awesome tutorial. clearly explaining step by step. thaks a LOT.

manojsanjeewa
Автор

This is great! Thanks for the help getting started!!

thekhalilstemmler
Автор

great stuff here-
I would like to add for mac users:

so after downloading and "unzipping" (just double click or try to open for mac to automatically unzip/decompress for you),
in terminal

sudo mv <mongodb file name that you have in your download folder without the greater and less than signs I put here> /usr/local/mongodb

ya could drag the file there but it will take you longer to find /usr/local folder and you might not have the right permissions (adding sudo makes sure that what ever you do in terminal you are giving it the blessings of the guy with permissions)

I'm a mac user and instead of creating /data/db in the C drive, which we don't have, we should create the folder in the root
so in terminal

sudo mkdir - p /data/db

again the sudo is to say you are the top dog running the commands...mkdir is to make a directory (folder) and the "-p" (also called flag p) allows a folder to be created inside a newly created folder in the same command (cause data is a folder and db is a folder inside of it)

you also need to "add mongo to your PATH" and all that means is that when you try to use mongo in terminal, bash needs to know where to look to find mongo. bash already has places it looks to add meaning to the commands you give it. The list of places it looks is what is called the PATH. Add mango to your PATH with this
in terminal

cd
ls -al

you should see a list of stuff including hidden files...see if you can find a file called .bash_profile
if ya don't have one you need to make one with

touch .bash_profile

if you already have it or if you just created it, just open it

open .bash_profile

and add mongo to the PATH (place for bash to look for your mongo stuff)

export MONGO_PATH=/usr/local/mongodb
export PATH=$PATH:$MONGO_PATH/bin

the first line is just a a variable to saving "/usr/local/mongodb" to the easier to read "MONGO_PATH"
the second line is using the PATH variable that your system already has ($PATH) and adds one more place to look (:$MONGO_PATH/bin) and saves that back to PATH

cheetahBeachwood
Автор

Thx dude, very useful lessons! Thx a lot again!

michaelkonchakovskyy
Автор

awesome tutorial man!! You should make more!

dmacgTV
Автор

Just for more information.
If you want to save you data in another drive than this is the way to connect mongodb to your data folder,
just write this in command prompt:
c:/mongodb/bin/mongod.exe --datapath f:/contactapp/data

This will automatically connect and won't give error.
I hope this will help for somebody...:)

HarshSoni
Автор

Thanks for the vids Michael!
I was wondering how to send data from mongoDB to my app using AngularJS. I knew mongoose already, but I didn't realize how to send data from the DB to a controller using AngularJS. <3

amandaavelino
Автор

Great tutorials!!! However I suggest you zoom closer when coding with the console, couldn't help squinting.

Kbonefan
Автор

Great Tutoria man, Question thou, ..If I would insert a checkbox how would that affect my data when adding as contact? help?

RiecEngelhardt
Автор

I am unable to access the test db, this is the error :

MongoDB shell version: 2.4.9
connecting to: test
Wed Mar 1 02:11:49.774 ERROR: can't get TCP_KEEPIDLE: errno:22 Invalid argument
Wed Mar 1 02:11:49.774 ERROR: can't get TCP_KEEPINTVL: errno:22 Invalid argument
> show dbs
local 0.078125GB

Is there a solution?

Ray-ndbv
Автор

could i use my own command prompt or do i have to use git bash for the process of using the mean stackor is it just convention and can i just use commpand prompt on my windows pc thanks

Zzzzzzzzzzzzzzzzzzzzr
Автор

sir your video is very much useful sir. but after instalation of mongodb when running with git cmd mongo file it is failed to load it is showing connection failed and in gitbash when runing with mongod also showing file is not found. but is there in the folder not loading. Please help me with your solutiom

hemanthkhkk
Автор

If you run into this error:

bash: cd: mongod: No such file or directory

use ./mongod.exe command instead.

victorhall
Автор

when I launch "mongo", it activates, but I don't have the carrot ">" character to start a command, it's just free type. I see the versioning, etc, and I can enter a command, and as long as there are no typos, it works. but if I use the arrow keys to try and cycle through my commands, it just freely moves my cursor up, and i can literally type over anything in the git-bash window. I can use the arrow key to move all over the git-bash window and anything I type just overrides whatever was there. it's weird!!

philagee
Автор

Got to ask: what is the 'n' in ninsert? does it stand for node insert?

Bou
Автор

Hii ..
when I type mongod in bin folder I get an error that says: "bash: mongod: command not found"

Please help

shubhamvyas
Автор

Once again the tutorial has problems with basic install. The MongoDB straight up install will put it self into c/Program Files/mongoDB/Server/3.2/bin. Fine. The problem is an ls command shows

bsondump.exe* mongod.exe* mongodump.exe* mongofiles.exe* mongooplog.exe* mongorestore.exe* mongos.pdb mongotop.exe*
mongo.exe* mongod.pdb mongoexport.exe* mongoimport.exe* mongoperf.exe* mongos.exe* mongostat.exe*

Why I get "bash: mongod: command not found" is odd. Prior experience was CentOS but I am not good there, although I did get Mongo working fine. Mostly a Windows .NET person. Does this require admin?

wesiniraq
welcome to shbcf.ru