npm install mongpdb: How do I install mongodb in location: c:\mongodb - node.js

I've been following this tutorial : http://cwbuecheler.com/web/tutorials/2014/restful-web-app-node-express-mongodb/, and I don't understand what I need to do in order to get my app to use it. I've successfully installed everything with node.js up until to where the directions at
part4: mongodb
mongo
this call doesn't start the mongodb like it should. I've installed mongodb and saved in C:\mongo like the directions suggest but I can't access the mongo console. My guess is that I don't have it in the right path because when I try:
C:\mongo\
mongod --dbpath c:\node\nodetest2\data
c:\mongo\
use nodetest3
it throws:
"use is not recognized as an internal command...etc"
That leads me to believe that it's not installed correctly after I do:
npm install mongodb
Another troubleshooting idea I have is trying to correct the variable path, maybe? It's probably a much more simple issue about it's file placement/installation directory. I'm at a total loss at this point.
I want to reiterate that I've tried the directions in the other similar questions that have already been asked, but it doesn't seem to work. I think I need more detailed questions, where my experience level isn't assumed (I know that this is a beginner tut, and its database section is just little a above my expertise at this point.

Related

node, express and mysql on cloud9

i'm playing around on cloud9 with node.
i can get a very simple express app working
Now i want to add an sql database to this.
however as soon as I install phpmyadmin [phpmyadmin-ctl install] the above program no longer works.
i suspect it has something to do with ports but can't find a way round it - anyone able to help?
thanks

I am unable to install expressJS in windows

this is the command i used to try and install express locally.
but the cursor keeps on rotating endlessly. I cant understand whats the problem. I am new to Node and its already testing my patience. Please help.
Comment if you need additional information.

MongoDB accessible through localhost but not 127.0.0.1

I am trying to run a web application locally that uses grunt and mongodb. The app allows users to upload information which they can then view in their gallery.
started mongodb with mongod --port 3000 --httpinterface
(As mentioned in the comments, I have tried running it without the --httpinterface as well)
browsing to 127.0.0.1:3000 gives a page with only the text "It looks like you are trying to access MongoDB over HTTP on the native driver port."
browsing to localhost:3000 loads my application
the application sends data over 127.0.0.1, and it is not going through
It seems very relevant to what is going on in this question.
I hope this will not be considered a duplicate, because after finding that question I tried to work through the answers offered without success. If I was able I would have tried pursuing this issue in the comments there.
Following the answers on that question I tried running mongo with a config file without success (no config file existed beforehand, I tried to create one with the sample offered on the mongo website but it rejects it). I also tried deleting the lock files and repairing mongo. Nothing has changed.
It's probably worth mentioning that the application I'm working with is an existing, sparsely documented project that was given to me for a school assignment. It is far more complicated than anything I have ever worked on and I am very unfamiliar with tools like mongo.

Register, login, logout Website with Node

I'm currently moving on with reading about node. I'm getting through the tutorials well using the command line. However I am thinking ahead and I want to create a simple register, log in and log out website.
Where would I place the node files on a server (all examples I see run from local host:3000)?
What is the best tutorial for creating this type of website from scratch with node?
Thanks in advance!
It doesn't really matter where you put the files on the server. The localhost:3000 bit comes from the fact that your core server file tells the server to listen on that port.
I would recommend using the express-generator from npm. It's pretty versatile and does a lot of the leg work.
Just run the following:
npm install express-generator
After installing, you'll need to just run the following to create a new web app:
express
The details are here: http://expressjs.com/starter/generator.html.
Also, try to read through and understand all of the pre-provided code.

Linking Containers / Building Images In Docker

I'm going to do my best to describe what I'm trying to accomplish and hopefully someone could help me out with the process I can use to get what I'm wanting done. Not really a step by step, but as I said just a process so I can kind of wrap my head around what needs to get done.
I have built a NodeJS blogging application. It requires the use of MongoDB. What I am attempting to do is have my dockerfile/mynodeblog image and dockerfile/mongodb and link the containers together (I do not want to include the installation of MongoDB in my blog Dockerfile, I would specifically like to link the containers). However I'm somewhat being caught up in a catch 22.
My node app again requires MongoDB which isn't a problem when just installing MongoDB, installing my node blog, and then running my node blog the old fashioned way. The problem I'm facing is that I'm trying to build my node blog into a Dockerfile and build out the image. Unfortunately the image will never be built out successfully because it needs MongoDB to finish. But MongoDB is going to be in another container!
If that made any sense at all, I would appreciate any feedback on how I could even begin to approach the problem I'm having. Thank you in advance!

Resources