1.0.5 • Published 3 years ago
allmiddle v1.0.5
allmiddle
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");