Skip to content

Commit df50b25

Browse files
committed
add how to use it
1 parent 4764a89 commit df50b25

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
OpenComponent Registry GraphQL Express middleware.
44

5-
```bash
6-
yarn
7-
yarn test
5+
## How to use it w/in your Registry
6+
7+
```javascript
8+
const middleware = require('oc-registry-graphql-express-middleware'); // once available on npm
9+
10+
registry.app.use('/graphql', middleware({ baseUrl: 'http://localhost:3000/', graphiql: true }));
811
```
912

1013
![query-registry](query-registry.png "query-registry")

query-registry.png

-863 Bytes
Loading

0 commit comments

Comments
 (0)