Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cokoapps/server
  • jgutix/server
2 results
Show changes
Commits on Source (3)
......@@ -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.
```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
```
......@@ -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
The server provides authorization checks through using `graphql-shield`.
......
const cron = require('node-cron')
const authentication = require('pubsweet-server/src/authentication')
const logger = require('@pubsweet/logger')
const app = require('./app')
......@@ -10,4 +11,5 @@ module.exports = {
app,
cron,
createJWT,
logger,
}