1.0.5 • Published 6 years ago

httpedis v1.0.5

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

HttPRedis

A HTTP wrapper for ioredis

Install

npm install httpedis

Usage

const config = {
    // Redis properties 
    REDIS_HOST: "localhost",
    REDIS_PORT: 6379,
    REDIS_AUTH: "mypassword", 
    REDIS_DB: 0, 
    // Server port
    HTTP_PORT: 9001
};

const Httpedis = require('httpedis');
const httpedis = new Httpedis(config);

// Starts the server
httpedis.start(optionalCallback);

// Reloading redis connection 
httpedis.reload({REDIS_DB: 1});

// Stopping server 
httpedis.stop(optionalCallback)

Enjoy

# GET all keys 
curl -X PUT -d foo=bar "localhost:9001/set/foo" 
curl "localhost:9001/get/foo" 
curl "localhost:9001/keys/*" 
["foo"]
1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago