Skip to content

Commit

Permalink
Added helmet dependency and middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
pstrassmann committed Oct 22, 2020
1 parent 50f21f5 commit d97a71a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"dotenv": "^8.2.0",
"express": "^4.17.1",
"express-session": "^1.17.1",
"helmet": "^4.1.1",
"moment": "^2.27.0",
"mongoose": "^5.9.25",
"morgan": "^1.10.0",
Expand Down
2 changes: 2 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const express = require('express');
const connectDB = require('./config/db');
const helmet = require("helmet");
const morgan = require('morgan');
const mongoose = require('mongoose');
const passport = require('passport');
Expand All @@ -16,6 +17,7 @@ dotenv.config({ path: './config/config.env' });
require('./config/passport')(passport);

const app = express();
app.use(helmet());
connectDB();

// Allow express to parse json
Expand Down

0 comments on commit d97a71a

Please sign in to comment.