hw-redis-ohm is a Node.js module for mapping JavaScript objects to Redis hashes (Object-Hash Mapping), providing a simple ORM-like interface for Redis. Version 0.6.5 is the latest stable release, with sporadic updates. It supports basic CRUD operations, indexing, and validation. Unlike ioredis or node_redis, it abstracts hash storage directly, but is not actively maintained and has limited documentation beyond test specs. Requires Node >=6.2.2 and a running Redis instance.
npm install hw-redis-ohmNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates defining a model with Ohm.define, creating an instance, saving to Redis, and fetching by ID.
Consider using a more modern Redis ORM like redis-om or ioredis-based solutions.
Ensure Redis is accessible via REDIS_HOST and REDIS_PORT environment variables or configure manually.
Write custom type declarations or use `@ts-ignore`.
Update code to use async/await or .then() instead of callbacks.
Do not set id property manually; use the auto-generated id after save.
Use `const Ohm = require('hw-redis-ohm')` instead of `import { Ohm } from 'hw-redis-ohm'`.Start Redis service or set correct REDIS_HOST and REDIS_PORT environment variables.
Run `npm install redis` in your project.
Update to version 0.6.x or check the API documentation for correct usage.