diff --git a/README.md b/README.md index 89195abb4d035b248f2bab509974950af745efe0..dabbd1bdc691cd8d73190e0ee15f9f1959e40afa 100644 --- a/README.md +++ b/README.md @@ -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