Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

noredis

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

noredis

simple shared storage for nodejs cluster

latest
Source
npmnpm
Version
0.0.10
Version published
Maintainers
1
Created
Source

noredis

This is extremely experimental stuff

This is a simple "shared storage" for nodejs cluster without redis-like daemon.

Features

  • set/get/del/exists/incr/decr/incrby/decrby/keys
  • hset/hget/hdel/hexists/hincrby/hlen/hkeys/hvals/hgetall
  • echo/flushall/flushdb
  • TODO: ....
  • see also redis command reference for supported commands

Install

npm install noredis

or

npm install git@github.com:iolo/node-noredis.git

How to Use(with cluster)

  • do require('noredis') before fork the first worker.
  • use noredis in workers.
  • that's all folks.
var cluster = require('cluster'),
    noredis = require('noredis'); // NOTE: before the first fork!

if (cluster.isMaster()) {
  ...
  cluster.fork();
  ...
} else {
  ...
  noredis.set('foo', 123);
  noredis.get('foo', function(err, reply) {
    console.log('foo is ' + reply);
  });
}

How to Use(without cluster)

  • simply require('noredis') and use it.
  • that's all ;)
var noredis = require('noredis');

...
noredis.set('foo', 123);
noredis.get('foo', function(err, reply) {
console.log('foo is ' + reply);
});

FAQs

Package last updated on 18 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts