I have difficulties when I study nodejs libraries for using its functions. They don't write document for every function so I don't know how I can learn about these functions. For example,
var db = redis.createClient();
User.prototype.save = function(fn) {
if (this.id) {
this.update(fn);
} else {
var user = this;
db.incr('user:ids', function(err, id) {
if (err) {
return fn(err);
}
...
In this code, they are using db.incr('user:ids', function(err, id){}) function for communication with Redis server, when I research homepage of this library(http://ift.tt/1Ccwn3d), I cannot find any line to explain how to use 'incr(..)' function.
Therefore, I would like to ask if there is a way to learn how to use nodejs libraries properly.
Thanks
Aucun commentaire:
Enregistrer un commentaire