Skip to content
Snippets Groups Projects
Commit 4301538d authored by Yannis Barlas's avatar Yannis Barlas
Browse files

docs(server): add base model to readme

parent 82e7cd5c
No related branches found
No related tags found
1 merge request!4feat(server): export BaseModel
This commit is part of merge request !4. Comments created here will be created in the context of that merge request.
......@@ -7,7 +7,10 @@ It is also meant to bundle as many server-side pubsweet dependencies as possible
Install package and remove the dependencies it is meant to replace.
```sh
yarn remove pubsweet pubsweet-server @pubsweet/logger # if migrating from an existing project
## if migrating from an existing project
yarn remove pubsweet pubsweet-server @pubsweet/logger @pubsweet/base-model
##
yarn add @coko/server
```
......@@ -36,14 +39,6 @@ If you place this file in `server/app.js`, starting the server should work autom
}
```
### Logger
To access the logger simply import like so:
```js
const { logger } = require('@coko/server')
```
### Authorization middleware
The server provides authorization checks through using `graphql-shield`.
......@@ -136,7 +131,26 @@ If you run your client on a different host/port than the server, you might run i
### Other exports from included packages
- `createJWT` is an export of a function in `pubsweet-server` that does just that. Useful if you have custom login resolvers.
##### Logger
Returns pubsweet's logger
```js
const { logger } = require('@coko/server')
```
##### Base Model
Returns pubsweet's base model
```js
const { BaseModel } = require('@coko/server')
```
##### createJWT
`createJWT` is an export of a function in `pubsweet-server` that does just that.
Useful if you have custom login resolvers.
### Future features
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment