<commit_before>// server.js

'use strict';

var express = require('express');
var app = express();
var mongoose = require('mongoose');
var morgan = require('morgan');
var bodyParser = require('body-parser');
var methodOverride = require('method-override');

// Configuration
const DB_URL = argv.db || process.env.DATABASE_URL;<commit_msg>Created initial server<commit_after>// server.js

'use strict';

var express = require('express');
var app = express();
var mongoose = require('mongoose');
var morgan = require('morgan');
var bodyParser = require('body-parser');          // Pull info from HTML POST
var methodOverride = require('method-override');  // Simulate DELETE and PUT

// =============================================================================
// Configuration

// DB Config
const DB_URL = argv.db || process.env.DATABASE_URL;
mongoose.connect(DB_URL);

// Set static files location /public/img will be /img for users
app.use(express.static(__dirname + '/public');

// Log every request to the console
app.use(morgan('dev'));

// Parse application/x-www-form-unlencoded, JSON, and vnd.api+json as JSON
app.use(bodyParser.urlencoded({'extended':'true'}));
app.use(bodyParser.json());
app.use(bodyParser.json({ type: 'application/vnd.api+json' }));

app.use(methodOverride());


// =============================================================================
// Initilize app
app.listen(8080);
console.log("App is running on port 8080");
{'fraction_non_alphanumeric': 0.2508591065292096, 'fraction_numerical': 0.005498281786941581, 'mean_word_length': 5.5, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '1481381', 'n_tokens_mistral': 421, 'n_tokens_neox': 407, 'n_words': 108}