allmiddle

1.0.5 • Public • Published

allmiddle

NPM VERSION NPM MODULE Known Vulnerabilities

A NPM package which comprises of all the major middlewares needed to be included in the projects.

Click here to view the source code on GITHUB

Installation

using npm:

$ npm install allmiddle

In Node.js:

const allmiddle = require('allmiddle').includeAllMiddle;

allmiddle(app);
OR
const allmiddle = require('allmiddle');

allmiddle.includeAllMiddle(app);

(where app = express();)

Why allmiddle?

With the of help of allmiddle, you don't have to do the manual inclusion of the major middlewares in your project.

The middlewares included in allmiddle are:

  • app.use(express.json());
  • app.use(express.static("public"));
  • app.use(express.static(__dirname));
  • app.use(express.urlencoded({extended: true}));
  • app.use(cookieParser());
  • app.use(cors());
  • app.use(helmet());
  • app.use(logger('dev'));
  • require("dotenv/config");

Package Sidebar

Install

npm i allmiddle

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

5.3 kB

Total Files

8

Last publish

Collaborators

  • ayush5588