WIP - seedlinux - Torrent indexing tool opensource torrents with share ratio's etc.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 6abec87f2b1c3a629d3fe242e3cc64f6b025d7b4
(DIR) parent 0c944b596f6d285a714fe2395f1eb292f20a0056
(HTM) Author: Jay Scott <me@jay.scot>
Date: Fri, 7 Jul 2017 13:24:06 +0100
WIP
Diffstat:
M app.js | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/app.js b/app.js
@@ -22,6 +22,7 @@ db.on('error', console.error.bind(console, 'MongoDB connection error:'));
const app = express();
+// Enable basic security but disable 'Strict-Transport-Security'
app.use(helmet({
hsts: false
}));
@@ -29,6 +30,7 @@ app.use(helmet({
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');
+// disable the logger in production
if (app.get('env') !== 'production') {
app.use(logger('dev'));
}
@@ -38,6 +40,7 @@ app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(express.static(path.join(__dirname, 'public')));
+// setup the DB
app.use(function(req,res,next){
req.db = db;
next();