Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 743 Bytes

README.md

File metadata and controls

45 lines (31 loc) · 743 Bytes

Build Status

Node.js Utilities

Installation

Using npm:

$ npm i --save rhases-nodejs-commons

Using

Pino Log

import l from 'rhases-nodejs-commons';

l.error(err);
l.info("foo", foo);

Service Utils

import {ServiceUtils} from 'rhases-nodejs-commons';

serviceUtils = new ServiceUtils(MyMongooseModel);

all() {
  return this.serviceUtils.all();
}

Controller Utils

import {ControllerUtils} from 'rhases-nodejs-commons';

controllerUtils = new ControllerUtils(MyService);

byId(req, res) {
  this.controllerUtils.byId(req, res);
}

Control Access