node-mongodb-socketio-server
Testing setting up a json-server with Node, Express (3), Socket.IO and node-mongodb-native.
This server saves notes to a database.
I also did a test for a rest-server with mysql: https://github.com/frodefi/node-mysql-json-server and a rest-server with mongodb: https://github.com/frodefi/node-mongodb-json-server
Please feel free to use this code as you like :)
I have learned and adapted code from (among others) the following tutorials while setting this up: http://howtonode.org/express-mongodb http://www.joezimjs.com/javascript/plugging-into-socket-io-the-basics/ http://www.joezimjs.com/javascript/plugging-into-socket-io-advanced/ http://codehenge.net/blog/2012/08/using-socket-io-with-express-3-x/ And of course all the docs from the developers of the modules mentioned on the top, for example: http://docs.mongodb.org/manual/tutorial/getting-started/ http://mongodb.github.com/node-mongodb-native/driver-articles/mongoclient.html
And some links partly on the topic of this repo: https://github.com/jfromaniello/passport.socketio http://www.cubrid.org/blog/cubrid-appstools/nodejs-speed-dilemma-ajax-or-socket-io/ http://www.danielbaulig.de/socket-ioexpress/
If you are new to Javascript, here are also a couple of links on some important aspects of the language: http://hangar.runway7.net/javascript/guide http://recurial.com/programming/understanding-callback-functions-in-javascript/