@reasondigital/library-nodejs-server-response

0.0.8 • Public • Published

Node JS SDK for PDT API schema

How to use

const Response = require('@reasondigital/library-nodejs-server-response');
const resp = new Response();
resp.addLink('self', 'https://abc.com');
let returnData = resp.getJSON();
//{"meta":{"error":null,"pagination":null,"status":200},"data":[],"links":{"self" : {"href" : "https://abc.com"}}}

Return data notes

Full details on the return type.

How to install repo

npm install @reasondigital/library-nodejs-server-response

How to lint locally

npm run-script lint

How to test locally

npm test

How to create documentation locally

npm run-script doc

How to publish new version

1* Bump semvar version in package.json 2* Run npm publish

Todo

  • Add more tests
  • Code coverage
  • Deploy to NPM using CI/CD to run linting etc before publishing
  • Typescript?

Readme

Keywords

Package Sidebar

Install

npm i @reasondigital/library-nodejs-server-response

Weekly Downloads

1

Version

0.0.8

License

UNLICENSED

Unpacked Size

13.3 kB

Total Files

3

Last publish

Collaborators

  • reason-digital