TheTotalJim
TheTotalJim

Reputation: 77

File structure for Node.js and MongoDB

I am currently learning Node.js and MongoDB for an open source project.

How should they be located in relation to one another as far as their source files?

MongoDB defaults the data folder to root, but I have MongoDB itself installed in a sub directory. Node.js in installed in yet another sub directory on same drive.

Do they need to be located in same location, or does that not matter?

Thanks for any clarification, didn't see this anywhere in the tutorials I am learning from.

Upvotes: 0

Views: 1187

Answers (1)

Duy Tran
Duy Tran

Reputation: 110

No. It doesn't matter.

When you use the mongo client to connect to the mongoDB server, you already specified a host & port of that mongodb instance (this is what matters).

To use mongoDB in nodeJS: http://mongodb.github.io/node-mongodb-native/2.2/api/.

Hope it helps

Upvotes: 2

Related Questions