Skip to content

Commit 7d9f46b

Browse files
committed
Add resource object specification
1 parent 205fc75 commit 7d9f46b

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

test/index.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,23 @@ import test from 'ava'
66
// test something
77
test.todo('testSomething')
88

9-
/*
9+
/* API
1010
const pattyOpts = {port: 8081}
1111
const patty = require('paternity')
1212
const handleIt = require('./some-other-resource')
1313
1414
await patty.init(pattyOpts)
15-
await patty.register('some-resource')
16-
await patty.register('some-other-resource', handleIt)
15+
const someResource = await patty.register('some-resource')
16+
const someOtherResource = await patty.register('some-other-resource', handleIt)
1717
await patty.start()
1818
*/
19+
20+
/* RESOURCE OBJECT
21+
{
22+
search: () => {},
23+
create: () => {},
24+
read: () => {},
25+
update: () => {},
26+
delete: () => {}
27+
}
28+
*/

0 commit comments

Comments
 (0)