From 4301538d7f807d8af7d7a49081b79d9479417d99 Mon Sep 17 00:00:00 2001 From: Yannis Barlas <yannisbarlas@gmail.com> Date: Thu, 28 May 2020 22:06:17 +0300 Subject: [PATCH] docs(server): add base model to readme --- README.md | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 89195ab..dabbd1b 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 -- GitLab