raccoon-azure-connect
v0.0.5
Published
A Collaborative Filtering Recommendation Engine for Node.js utilizing Redis with azure redis connection
Downloads
6
Maintainers
Readme
recommendationRaccoon (raccoon)
npm install raccoon-azure-connect --save
+usage
var raccoon = require('raccoon-azure-connect');
raccoon.connect(6379,'<name>.redis.cache.windows.net', '<key>');
//it works
I changed connect function because it could not connect on azure redis. It did not work with auth
raccoon.connect(6379,'<name>.redis.cache.windows.net', {auth_pass: '<key>', tls: {servername: '<name>.redis.cache.windows.net'}});
//it is not work
in library
Raccoon.prototype.connect = function(port, url, auth){
port = port || 6379;
url = url || '127.0.0.1';
auth = auth || '';
client = redis.createClient(port, url);
if (auth){
client.auth(auth, function (err) {
if (err) { throw err; }
});
}
};
i changed connect function with
Raccoon.prototype.connect = function(_port, hostName, key){
port = _port || 6379;
url = hostName;
auth = {auth_pass:key, tls: {servername: hostName}};
client = redis.createClient(port, url, auth);
};
finally connect like this
raccoon.connect(6379,'<name>.redis.cache.windows.net', '<key>');
//it works
Links
- origin raccoon libray url: https://github.com/guymorita/recommendationRaccoon
- azure connection : https://azure.microsoft.com/en-us/documentation/articles/cache-nodejs-get-started/
- contact : http://altamirasoft.com