seedlinux

find open source torrents and stats for people wishing to contribute bandwidth.
git clone git://git.beardyjay.co.uk/seedlinux
Log | Files | Refs | README | LICENSE

commit 75702055925d3d6f8f446061ed1d28918f451de1
parent c0d6350055d8702105c7978ae1b66eb4c2b281fd
Author: Jay Scott <jay@beardyjay.co.uk>
Date:   Fri,  7 Jul 2017 13:24:06 +0100

WIP

Diffstat:
Mapp.js | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

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();