maf-http

0.16.0 • Public • Published

maf-http

http handling powered with express and joi

stability-unstable

usage

const Http = require('maf-http');
const express = require('express');

const app = express();

// add your middlewares: body-parser, cookie-parser, etc

// then create maf-http instance and init http methods with request validation

const http = new Http(logger, config);

// init di with models, apis, etc this object will be in every request object
const di = {};

http.initApp(app, di)
    .then(app => http.initMethods(app, di))
    .catch((error) => {

    })

API

docs/api

LICENSE

MIT

Readme

Keywords

Package Sidebar

Install

npm i maf-http

Weekly Downloads

6

Version

0.16.0

License

MIT

Last publish

Collaborators

  • alekzonder