All Projects → shanev → tempdb

shanev / tempdb

Licence: MIT license
Redis-backed ephemeral key-value store for Node

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to tempdb

FastKV
FastKV is an efficient key-value storage library.
Stars: ✭ 275 (+816.67%)
Mutual labels:  key-value
AsyncTcpClient
An asynchronous variant of TcpClient and TcpListener for .NET Standard.
Stars: ✭ 125 (+316.67%)
Mutual labels:  async-await
jsoning
✨ A simple key-value JSON-based persistent lightweight database. ✨
Stars: ✭ 70 (+133.33%)
Mutual labels:  key-value
EnumerableAsyncProcessor
Process Multiple Asynchronous Tasks in Various Ways - One at a time / Batched / Rate limited / Concurrently
Stars: ✭ 84 (+180%)
Mutual labels:  async-await
async
Asynchronous programming for R -- async/await and generators/yield
Stars: ✭ 37 (+23.33%)
Mutual labels:  async-await
trakeva
Transactions, Keys, and Values
Stars: ✭ 24 (-20%)
Mutual labels:  key-value
redis-multi-programming-language-practice
🖖 Learn how to use Redis, from beginner basics to advanced techniques | 最新 Redis 底层原理分析与多语言应用实践
Stars: ✭ 28 (-6.67%)
Mutual labels:  key-value
is-async-supported
Check if async/await is available natively
Stars: ✭ 16 (-46.67%)
Mutual labels:  async-await
react-keyevent
An easy-to-use keyboard event react component, Package size less than 3kb
Stars: ✭ 38 (+26.67%)
Mutual labels:  key-value
koa2-example-app
An app that is built using koa2 and async/await
Stars: ✭ 85 (+183.33%)
Mutual labels:  async-await
react-app-simple-chat-app
A Simple Chat Application using MERN stack (MongoDB, Express JS, React JS, Node JS) and Socket.io for real time chatting
Stars: ✭ 41 (+36.67%)
Mutual labels:  async-await
keyval-resource
a resource that passes key values between jobs
Stars: ✭ 39 (+30%)
Mutual labels:  key-value
banana
🍌 Modern C++ Telegram Bot API library
Stars: ✭ 30 (+0%)
Mutual labels:  async-await
ansible-role-etcd
Ansible role for installing etcd cluster
Stars: ✭ 38 (+26.67%)
Mutual labels:  key-value
KVStore
Swift wrapper over sqlite to store key value pairs in db 🎊🎈
Stars: ✭ 22 (-26.67%)
Mutual labels:  key-value
aioudp
Asyncio UDP server
Stars: ✭ 21 (-30%)
Mutual labels:  async-await
auto-async-wrap
automatic async middleware wrapper for expressjs errorhandler.
Stars: ✭ 21 (-30%)
Mutual labels:  async-await
simplehstore
🏪 Easy way to use a PostgreSQL database (and the HSTORE feature) from Go
Stars: ✭ 54 (+80%)
Mutual labels:  key-value
eslint-config-welly
😎 ⚙️ ESLint configuration for React projects that I do. Feel free to use this!
Stars: ✭ 21 (-30%)
Mutual labels:  async-await
quickmongo
Quick mongodb wrapper for beginners that provides key-value based interface.
Stars: ✭ 73 (+143.33%)
Mutual labels:  key-value

TempDB

npm version Build Status codecov codebeat badge Dependencies

TempDB is Redis-backed temporary key-value store for Node. It's useful for storing temporary data such as login codes, authentication tokens, and temporary passwords.

Installation

npm install tempdb

Run Redis server

Check out Redis quickstart to install for your platform, or use one of the many cloud providers. Depending on your Redis provider, you may need to enable keyspace events for ephemeral keys to work.

A convenience script is provided for macOS default Homebrew Redis installs:

npm run redis

Usage

Require TempDB:

const TempDB = require('tempdb');

Initialize TempDB, connecting to a Redis client:

const tempDB = new TempDB(redisClient);

Add a key/value pair. Value is anything that can be serialized to JSON. Expires (in seconds) is optional.

tempDB.add('key', value, expires);

Find by key:

const value = await tempDB.find('key');

Find and delete by key:

const value = await tempDB.findAndDelete('key');

Tests

npm install
npm test

Ports to other languages

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].