Skip to content

Knowre-Dev/swint-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swint-middleware

Greenkeeper badge Essential expressJS middlewares and general middleware loader for Swint

Warning: This is not the final draft yet, so do not use this until its official version is launched

Installation

$ npm install --save swint-middleware

Loader

Options

  • dir : String, default: path.dirname(require.main.filename)
  • walkOption : Object, default: { ext: 'js' }

Usage

var middlewares = loader({
	dir: path.join(__dirname, 'middlewares')
}); // { middlewareA: [Function], middlewareB: [Function], ... }

Middlewares

Usage

app.use(myMiddleware(options));
  • myMiddleware() (not myMiddleware itself) gets three arguments, which is req, res, next.

About

Sample middlewares for Swint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •