0.1.1 • Published 8 years ago

promiredis v0.1.1

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

Promiredis

Build Status

Promise wrapped node redis client.

Installation

npm i --save promiredis

Usage

import promiredis from 'promiredis'

async function main() {
	promiredis.initialize({ port: 6379, host: 'localhost', namespace: 'FOO' })
	
	// will write into key 'FOO/foo'
	await promiredis.set('foo', { name: 'foo' })
	
	// will get from key 'FOO/foo'
	const res = await promiredis.get('foo')
}

try {
	main()
} catch (e) { ... }