From a3ced159a8ed0a0a6904bc32a23c03a32946ae1d Mon Sep 17 00:00:00 2001 From: Lucas Gabriel Lima <lgl15@inf.ufpr.br> Date: Mon, 12 Sep 2016 11:39:11 -0300 Subject: [PATCH] add passport authentication module to server.js --- server.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server.js b/server.js index f27cd5c8..99664f78 100644 --- a/server.js +++ b/server.js @@ -5,8 +5,15 @@ var config = require(libs + 'config') var log = require(libs + 'log')(module) var app = require(libs + 'app') +//authentication +var passport = require('passport'); +var jwt = require('jwt-simple'); + app.set('port', process.env.PORT || config.get('port') || 3000) +// Use the passport package +app.use(passport.initialize()); + var server = app.listen(app.get('port'), function() { debug('Express server listening on port ' + server.address().port) log.info('Express server listening on port ' + server.address().port) -- GitLab