<commit_before>var express = require('express'),
    bodyParser = require('body-parser'),
    session = require('express-session'),
    passport = require('passport'),
    jwt = require('jwt-simple');

var User = require('../app/models/user.server.model');

module.exports = function() {

	var app = express();

  // Use middleware
  app.use(bodyParser.urlencoded({ extended: true }));
  app.use(bodyParser.json());

  app.use(express.static('public'));

  app.use(session(
    {
      secret: 'IHopeNobodyCanGuessThisSecret',
      saveUninitialized: false,
      resave: false
    }
  ));
  app.use(passport.initialize());
  app.use(passport.session());

  // Include passport config
  require('./passport')(app, passport, jwt);

  // Include all routes
  require('../app/routes/users.server.routes')(app, passport);
  require('../app/routes/emails.server.routes')(app);

  return app;
}<commit_msg>Use process.cwd() to serve static files<commit_after>var express = require('express'),
    bodyParser = require('body-parser'),
    session = require('express-session'),
    passport = require('passport'),
    jwt = require('jwt-simple');

var User = require('../app/models/user.server.model');

module.exports = function() {

	var app = express();

  // Use middleware
  app.use(bodyParser.urlencoded({ extended: true }));
  app.use(bodyParser.json());

  app.use(express.static(process.cwd() + '/public'));

  app.use(session(
    {
      secret: 'IHopeNobodyCanGuessThisSecret',
      saveUninitialized: false,
      resave: false
    }
  ));
  app.use(passport.initialize());
  app.use(passport.session());

  // Include passport config
  require('./passport')(app, passport, jwt);

  // Include all routes
  require('../app/routes/users.server.routes')(app, passport);
  require('../app/routes/emails.server.routes')(app);

  return app;
}
{'fraction_non_alphanumeric': 0.17886178861788618, 'fraction_numerical': 0.0, 'mean_word_length': 3.7455012853470437, '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': '2709576', 'n_tokens_mistral': 601, 'n_tokens_neox': 581, 'n_words': 104}