Skip to content
Browse files

update readme

  • Loading branch information...
1 parent 82cd241 commit cbc129b05c99639f0e2e95c9625ed2874e9e4984 @madhums committed Jun 19, 2013
Showing with 17 additions and 1 deletion.
  1. +17 −1 README.md
View
18 README.md
@@ -10,7 +10,23 @@ $ npm install mongoose-user
or include it in `package.json`
## Usage
-todo...
+
+```js
+var mongoose = require('mongoose')
+var userPlugin = require('mongoose-user')
+
+var UserSchema = new mongoose.Schema({
+ name: { type: String, default: '' },
+ email: { type: String, default: '' },
+ username: { type: String, default: '' },
+ hashed_password: { type: String, default: '' },
+ salt: { type: String, default: '' }
+})
+
+UserSchema.plugin(userPlugin, {})
+
+mongoose.model('User', UserSchema)
+```
## License
MIT

0 comments on commit cbc129b

Please sign in to comment.
Something went wrong with that request. Please try again.