Skip to content

franciscop/loadware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

loadware

Make sense of a bunch of middleware definitions and return an array of middleware:

const loadware = require('loadware');

let router = require('express').Router();
router.get('/', (req, res) => { res.send('Hello there'); });

let middlewares = loadware(
  'body-parser',
  (req, res, next) => { next(); },
  './middle/whatever.js',
  router
);

The middleware can be a string, a function or an array of any of the previous.

This is part of another project which is WIP right now, but I think this is independently enough so it can be launched separately.

About

Make sense of a bunch of middleware definitions and return an array of middleware

Resources

License

Stars

Watchers

Forks

Packages

No packages published