This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var watchify = require('watchify'); | |
var glob = require('glob'); | |
var browserify = require('browserify'); | |
gulp.task('js', function(){ | |
glob('./scripts/*.js', function(err, files) { | |
files.forEach(function(entry) { | |
var w = watchify(browserify({ entries: [entry] })) | |
var build = function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var passportFacebookMiddleware = function(req,res,next){ | |
var conf = { | |
session:false, | |
callbackURL: 'http://localhost:3000/auth/facebook/callback?returnTo='+encodeURIComponent('/pepe/lala') | |
}; | |
passport.authenticate('facebook', conf)(req,res,next); | |
} | |
app.get('/auth/facebook',passportFacebookMiddleware,function(req,res,next){ | |
res.json(arguments); |
NewerOlder