<commit_before>//Lets require/import the HTTP module
var http = require('http');
var express = require('express');
var config = require('./config');
// Using require() in ES5 
var FB = require('fb');
var passport = require('passport')
FacebookStrategy = require('passport-facebook').Strategy;
//var passport = require('passport-facebook');

var app = express();
//Lets define a port we want to listen to
const PORT=8080; 

passport.use(new FacebookStrategy({
    clientID: '866100573474781',
    clientSecret: '<KEY>',
    callbackURL: "http://momsim.in:8080/auth/facebook/callback"
  },
    function(accessToken, refreshToken, profile, cb) {
    /*User.findOrCreate({ facebookId: profile.id }, function (err, user) {
      return cb(err, user);
    });*/
  
        if (profile) {
            user = profile;
            res1.end(user);
            //return done(null, user);
        }
        else {
            //return done(null, false);
        }
    }
));

app.get('/auth/facebook',
  passport.authenticate('facebook'));

app.get('/auth/facebook/callback',
  passport.authenticate('facebook', { failureRedirect: '/login' }),
  function(req, res) {
    // Successful authentication, redirect home.
    res.redirect('/');
  });


FB.options({accessToken: config.facebook.token});

app.get('/', function (req, res1) {
   
        res1.end("Hello Welcome ");
        //res1.sendFile('index.html');
    
})


app.get('/mypermissions', function (req, res1) {<commit_msg>user error<commit_after>//Lets require/import the HTTP module
var http = require('http');
var express = require('express');
var config = require('./config');
// Using require() in ES5 
var FB = require('fb');
var passport = require('passport')
FacebookStrategy = require('passport-facebook').Strategy;
//var passport = require('passport-facebook');

var app = express();
//Lets define a port we want to listen to
const PORT=8080; 

passport.use(new FacebookStrategy({
    clientID: '866100573474781',
    clientSecret: '<KEY>',
    callbackURL: "http://momsim.in:8080/auth/facebook/callback"
  },
    function(accessToken, refreshToken, profile, cb) {
    /*User.findOrCreate({ facebookId: profile.id }, function (err, user) {
      return cb(err, user);
    });*/
  
        if (profile) {
            user = profile;
            console.log(user);
            //res1.end(user);
            //return done(null, user);
        }
        else {
            //return done(null, false);
        }
    }
));

app.get('/auth/facebook',
  passport.authenticate('facebook'));

app.get('/auth/facebook/callback',
  passport.authenticate('facebook', { failureRedirect: '/login' }),
  function(req, res) {
    // Successful authentication, redirect home.
    res.redirect('/');
  });


FB.options({accessToken: config.facebook.token});

app.get('/', function (req, res1) {
   
        res1.end("Hello Welcome ");
        //res1.sendFile('index.html');
    
})


app.get('/mypermissions', function (req, res1) {
{'fraction_non_alphanumeric': 0.16902356902356902, 'fraction_numerical': 0.019528619528619527, 'mean_word_length': 3.036684782608696, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1897920', 'n_tokens_mistral': 941, 'n_tokens_neox': 894, 'n_words': 206}