Skip to content

Commit b2f4bde

Browse files
committed
Removing documentation for id property for #11
1 parent cc72006 commit b2f4bde

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,22 @@ npm install feathers-nedb --save
1919
Creating an NeDB service is this simple:
2020

2121
```js
22+
var NeDB = require('nedb');
2223
var service = require('feathers-nedb');
23-
var nedb = require('nedb');
24+
var service = require('nedb');
2425

26+
var db = new NeDB({
27+
filename: './data/todos.db',
28+
autoload: true
29+
});
2530

26-
app.use('todos', nedb('todos', options));
31+
app.use('todos', service({
32+
Model: db,
33+
paginate: {
34+
default: 2,
35+
max: 4
36+
}
37+
}));
2738
```
2839

2940
This will create a `todos` datastore file in the `db-data` directory and automatically load it. If you delete that file, the data will be deleted.
@@ -181,7 +192,6 @@ app.use('/todos', myService);
181192
The following options can be passed when creating a new NeDB service:
182193

183194
- `db` - The NeDB database instance
184-
- `id` (default: `_id`) [optional] - The name of the id property
185195
- `paginate` [optional] - A pagination object containing a `default` and `max` page size (see below)
186196

187197

0 commit comments

Comments
 (0)