views:

596

answers:

1

Hello.

I've heard much good about nodejs and writting client-server application with it. But I can't get, for example, when developing IM client-server application, how nodejs server script is supposed to talk to database server to actually store it's data? Or may be I miss something and nodejs server scripts are not supposed to do that? If so, please, push me to correct direction.

I've noticed DBSLayer http://code.nytimes.com/projects/dbslayer/wiki, but it looks like it's still in beta.

+11  A: 

You need to grab a module that handles the communication to the database you want. See here for a list of modules for node.js. Popular databases that work well with node.js are MongoDB, CouchDB and Redis.

stagas
Aha, thank you!
FractalizeR
You can check the tick to accept it if this answer was helpful to you :)
stagas
Just did that ;)
FractalizeR
Thank you FractalizeR :)
stagas
Couchdb is an excellent choice for use with node. There are some great modules on github for interfacing with the database
jdc0589