Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

azuki-trusty / azk   deb

Repository URL to install this package:

Version: 0.5.1 

/ usr / lib / azk / node_modules / memcached / examples / cluster_memcached_connect.js

var nMemcached = require( '../' ),
	assert = require('assert'),
	memcached;

// connect to our memcached server on host 10.211.55.5, port 11211
memcached = new nMemcached( ["10.211.55.5:11211","10.211.55.5:11212","10.211.55.5:11213"] );
memcached.set( "hello_world", "greetings from planet node", 1000, function( err, success ){

	// check if the data was stored
	assert.equal( success, true, "Successfully stored data" )

	memcached.get( "hello_world", function( err, success ){
		assert.equal( success, "greetings from planet node", "Failed to fetched data" )
		process.stdout.write( success );
		memcached.end()
	});
});