<commit_before>/**
 * Module dependencies.
 */
var express = require('express')
  , passport = require('passport')
  , site = require('./site')
  , oauth2 = require('./oauth2')
  , user = require('./user')
  , client = require('./client')
  , util = require('util')
  
  
// Express configuration
  
var app = express.createServer();
app.set('view engine', 'ejs');
//app.use(express.logger());
app.use(express.cookieParser());
app.use(express.bodyParser());
app.use(express.session({ secret: 'keyboard cat' }));
app.use(passport.initialize());
app.use(passport.session());
app.use(app.router);
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));

// Passport configuration
require('./auth');


app.get('/', site.index);
app.get('/login', site.loginForm);
app.post('/login', site.login);
app.get('/logout', site.logout);
app.get('/account', site.account);

app.get('/dialog/authorize', oauth2.authorization);
app.post('/dialog/authorize/decision', oauth2.decision);
app.post('/oauth/token', oauth2.token);



app.get('/api/userinfo', user.info);
app.get('/api/clientinfo', client.info);


app.get('/protected-endpoint',
    passport.authenticate('bearer', {session: false}),
    function(req, res){
        res.json(req.user.name);
    }
);

app.listen(process.env.PORT || 3000);
<commit_msg>update default http port<commit_after>/**
 * Module dependencies.
 */
var express = require('express')
  , passport = require('passport')
  , site = require('./site')
  , oauth2 = require('./oauth2')
  , user = require('./user')
  , client = require('./client')
  , util = require('util')
  
  
// Express configuration
  
var app = express.createServer();
app.set('view engine', 'ejs');
//app.use(express.logger());
app.use(express.cookieParser());
app.use(express.bodyParser());
app.use(express.session({ secret: 'keyboard cat' }));
app.use(passport.initialize());
app.use(passport.session());
app.use(app.router);
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));

// Passport configuration
require('./auth');


app.get('/', site.index);
app.get('/login', site.loginForm);
app.post('/login', site.login);
app.get('/logout', site.logout);
app.get('/account', site.account);

app.get('/dialog/authorize', oauth2.authorization);
app.post('/dialog/authorize/decision', oauth2.decision);
app.post('/oauth/token', oauth2.token);



app.get('/api/userinfo', user.info);
app.get('/api/clientinfo', client.info);


app.get('/protected-endpoint',
    passport.authenticate('bearer', {session: false}),
    function(req, res){
        res.json(req.user.name);
    }
);

app.listen(process.env.PORT || 80);

{'fraction_non_alphanumeric': 0.21555977229601517, 'fraction_numerical': 0.0060721062618595825, 'mean_word_length': 4.632478632478633, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4454092', 'n_tokens_mistral': 880, 'n_tokens_neox': 861, 'n_words': 149}