A Nodejs community developed with Nodejs, nodeclub Open source, hence downloaded a good study, Github homepage: https://github.com/muyuan/nodeclub
Effect Chart:
first under the Mac:
Install MongoDB
Http://www.mongodb.org/downloads
Run the mongod underneath the bin
Ps:mongodb will default to the data file in/data/db, you need to build a directory, and the right to the current user
GUI Tools for installing MongoDB
Mongohub
Preview interface
Use git to download the Nodeclub source code, and then run
npm-d Install
CP Config.default.js Config.js
Modify the config file as yours
Node App.js
A complete Nodejs site on the set up, and then began to study the code slowly, while watching learning it ~
If you are under win:
or download MongoDB, set the path, start
Download GUI Tools Mongovue
Two questions that might come up in the back
1:window cannot be installed under Mongoose
Err! Unsupported
Err! Not compatible with your operating system or architecture: <a href= "Mailto:mongodb@0.9.9-7" >mongodb@0.9.9-7</a >
Err! Valid os:linux,darwin,freebsd,sunos,windows
Err! Valid Arch:any
Err! Actual Os:win32
Err! Actual Arch:ia32
Solution Method:
Download a mongoose, put it under% of your item%node_modules, and then execute npm-d in Mongoose directory install
2: After registering the user, login error cannot use ' in ' operator to search for ' minimize ' in user
Typeerror:cannot use ' in ' operator to search for ' minimize ' in user
At string.in (native)
At Model.toobject (f:nodejsnodeclubnode_modulesmongooselibdocument.js:1159:19)
At Model.tojson (f:nodejsnodeclubnode_modulesmongooselibdocument.js:1229:15)
At object.stringify (native)
At array.0 (f:nodejsnodeclubnode_modulesexpressnode_modulesconnectlibmiddlewaresessionmemory.js:74:31)
At Eventemitter._tickcallback (node.js:192:40)
Solution: Transmission Door
Modify the node_modulesmongooselibdocument.js below
if (!options) {
To
if (!) ( Options && ' Object ' = = Options.constructor.name)) {
It's OK.