Skip to content
Snippets Groups Projects

feat(server): export logger

Merged Juan requested to merge export-logger into master
1 file
+ 9
1
Compare changes
  • Side-by-side
  • Inline
+ 9
1
@@ -7,7 +7,7 @@ It is also meant to bundle as many server-side pubsweet dependencies as possible
@@ -7,7 +7,7 @@ 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.
Install package and remove the dependencies it is meant to replace.
```sh
```sh
yarn remove pubsweet pubsweet-server # if migrating from an existing project
yarn remove pubsweet pubsweet-server @pubsweet/logger # if migrating from an existing project
yarn add @coko/server
yarn add @coko/server
```
```
@@ -36,6 +36,14 @@ If you place this file in `server/app.js`, starting the server should work autom
@@ -36,6 +36,14 @@ 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
### Authorization middleware
The server provides authorization checks through using `graphql-shield`.
The server provides authorization checks through using `graphql-shield`.