<commit_before>// The main application script, ties everything together.
var bodyParser = require('body-parser');
var config = require('./server/config/config');
var express = require('express');
var mongoose = require('mongoose');
var morgan = require('morgan');
var app = express();

var http = require('http').Server(app);
var io = require('socket.io')(http);

// connect to Mongo when the app initializes and 
// drop the db before seeding
mongoose.connect(config.database, function(err) {
  if (err) {
    console.log(err);
  } else {
    console.log('Server connected to the database.');
  }
});


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

app.use(morgan('dev'));

app.use(express.static(__dirname + '/app'));

var api = require('./server/routes/index')(app, express, io);
app.use('/api', api);

app.get('/*', function(req, res) {
  res.sendFile(__dirname + '/app/index.html');
});

http.listen(config.port, function(err) {
  if (err) {
    console.log(err);
  } else {
    console.log('Listening on port: ' + config.port);
  }
});<commit_msg>[Fixes #110941068] Changes the serving directory<commit_after>// The main application script, ties everything together.
var bodyParser = require('body-parser');
var config = require('./server/config/config');
var express = require('express');
var mongoose = require('mongoose');
var morgan = require('morgan');
var app = express();

var http = require('http').Server(app);
var io = require('socket.io')(http);

// connect to Mongo when the app initializes and 
// drop the db before seeding
mongoose.connect(config.database, function(err) {
  if (err) {
    console.log(err);
  } else {
    console.log('Server connected to the database.');
  }
});


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

app.use(morgan('dev'));

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

var api = require('./server/routes/index')(app, express, io);
app.use('/api', api);

app.get('/*', function(req, res) {
  res.sendFile(__dirname + '/public/index.html');
});

http.listen(config.port, function(err) {
  if (err) {
    console.log(err);
  } else {
    console.log('Listening on port: ' + config.port);
  }
});
{'fraction_non_alphanumeric': 0.18685276902296263, 'fraction_numerical': 0.00405222872579919, 'mean_word_length': 4.472906403940887, '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': '1575082', 'n_tokens_mistral': 720, 'n_tokens_neox': 719, 'n_words': 175}