Skip to content

Commit 25e4d90

Browse files
committed
Merge branch 'master' of https://github.com/joelalejandro/feathers-hooks-jsonapify into fix/issue-1
2 parents 8551978 + 7209d94 commit 25e4d90

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
11
# feathers-hooks-jsonapify
22
Feathers hook for outputting data in a JSON-API-compliant way.
3+
4+
## Installing
5+
6+
Simply run `npm install --save feathers-hooks-jsonapify` and you're good to go!
7+
8+
## Usage
9+
10+
> **Important:** As of version 0.1.0, this hook is intended to use with Sequelize. Further versions will move the coupling code to hook configurations.
11+
12+
Require the hook:
13+
14+
```js
15+
const jsonapify = require('feathers-hooks-jsonapify');
16+
```
17+
18+
Thee choose how to implement it.
19+
20+
### Tied up to a service
21+
22+
```js
23+
app.service('messages').hooks({
24+
after: {
25+
find: [ jsonapify() ],
26+
get: [ jsonapify() ]
27+
}
28+
});
29+
```
30+
31+
### As a global hook
32+
33+
```js
34+
app.hooks({
35+
after: {
36+
find: [ jsonapify() ],
37+
get: [ jsonapify() ]
38+
}
39+
});
40+
```
41+
42+
## TODOs
43+
44+
Check out the [issues](https://github.com/joelalejandro/feathers-hooks-jsonapify/issues).
45+
46+
## Feel like contributing?
47+
48+
Knock yourself out! Fork the repo and make a PR.
49+
50+
## Licence
51+
52+
MIT
53+

0 commit comments

Comments
 (0)