Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "ron", | ||
"version": "0.0.3", | ||
"description": "Redis ORM for NodeJs", | ||
"description": "Redis ORM for NodeJs.", | ||
"keywords": ["redis", "orm", "database", "nosql"], | ||
"version": "0.0.4", | ||
"homepage": "http://www.adaltas.com/projects/node-ron", | ||
"author": "David Worms <david@adaltas.com>", | ||
"contributors": [ | ||
{ "name": "David Worms", "email": "david@adaltas.com" } | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wdavidw/node-ron" | ||
}, | ||
"bugs": { | ||
"email": "open@adaltas.com", | ||
"url": "http://github.com/wdavidw/node-ron/issues" | ||
}, | ||
"dependencies": { | ||
@@ -13,12 +20,13 @@ "redis": "latest" | ||
"devDependencies": { | ||
"expresso": "latest" | ||
"mocha": "latest", | ||
"should": "latest" | ||
}, | ||
"engines": { | ||
"node": ">= 0.3.0" | ||
}, | ||
"keywords": ["redis", "orm", "database", "nosql"], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wdavidw/node-redis-orm.git" | ||
"contributors": [ | ||
{ "name": "David Worms", "email": "david@adaltas.com" } | ||
], | ||
"main": "index", | ||
"engines": { "node": ">= 0.4.0" }, | ||
"scripts": { | ||
"test": "mocha" | ||
} | ||
} |
@@ -5,4 +5,26 @@ | ||
Ad-lib, be carefull, this project is experimental. | ||
Installation | ||
------------ | ||
```bash | ||
npm install ron | ||
``` | ||
Usage | ||
----- | ||
```javascript | ||
ron = require('ron'); | ||
client = ron({ | ||
redis_port: 6379 | ||
redis_host: '127.0.0.1' | ||
name: 'auth' | ||
}); | ||
users = client.define('users'); | ||
users.property('id', {identifier: true}); | ||
users.property('username', {unique: true}); | ||
users.property('email', {index: true, email: true}); | ||
users.property('name', {}); | ||
``` | ||
The library provide | ||
@@ -14,25 +36,3 @@ ------------------- | ||
* Records are pure object, no extended class, no magic properties | ||
* Code, tests and readme written in coffescript, samples written in javascript | ||
Quick exemple | ||
------------- | ||
ron = require 'ron' | ||
app = ron | ||
host: '' | ||
port: '' | ||
name: 'auth' | ||
User = app.create 'users' | ||
User.property 'id', | ||
identifier: true | ||
# Use a hash index | ||
User.property 'username', | ||
type: 'string' | ||
unique: true | ||
# Use a sorted set index | ||
User.property 'email', | ||
type: 'string' | ||
index: true | ||
Client API | ||
@@ -43,3 +43,3 @@ ---------- | ||
* Client::quit | ||
* Client::create | ||
* Client::define | ||
@@ -51,4 +51,4 @@ Schema API | ||
* Records::identifier | ||
* Records::index | ||
* Records::unique | ||
* Records::index | ||
* Records::email | ||
@@ -73,7 +73,11 @@ | ||
Start a redis server (tested against version 2.9.0) on the default port | ||
redis-server ./conf/redis.conf | ||
```bash | ||
redis-server ./conf/redis.conf | ||
``` | ||
Run the test suite with *expresso*: | ||
expresso -s | ||
```bash | ||
expresso -s | ||
``` | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
57723
21
1
79
1
2