Helmet for Express is commonly used for setting up Security for Your Web Application. It is group of middleware for security.
HOW TO INSTALL?
Install Helmet and Express using Node Package Manager (NPM)
npm install --save express
npm install --save helmet
HOW TO INCLUDE?
Include Helmet and Express in your application in the following way in the main app.js/server.js
const express = require('express');
const helmet = require('helmet');
HOW TO USE?
Finally use it as a middleware right after creating express instance.
const app = express();
app.use(helmet());
Comments
Post a Comment