<commit_before>// Include Modules:
const express = require('express');
const path = require('path');
const app = express();

// Database related
const db = require('../db/db');
const controller = require('./controller.js');
const Users = require('../db/models/userModel');
const Posts = require('../db/models/postModel');
const bcrypt = require('bcrypt-nodejs');

// Middleware & helpers
const bodyParser = require('body-parser');
const session = require('express-session');
const util = require('../lib/utility');

// Server Side Rendering:
// We use pug to render the individual pages
// In the views folder there are .html and .pug pairs
// If you'd like to add more routes, be sure to add both!
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');

// Parse JSON and Parse Forms (signup/login):
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

app.use(express.static(path.resolve('dist')));

// Enable sessions:
app.use(session({
  secret: 'shhh, it\'s a secret',
  resave: false,
  saveUninitialized: true
}));


// ----------------------------------------------------------------------------
// Public Facing Routes (non-authentication):<commit_msg>(fix) Update relative path for util<commit_after>// Include Modules:
const express = require('express');
const path = require('path');
const app = express();

// Database related
const db = require('../db/db');
const controller = require('./controller.js');
const Users = require('../db/models/userModel');
const Posts = require('../db/models/postModel');
const bcrypt = require('bcrypt-nodejs');

// Middleware & helpers
const bodyParser = require('body-parser');
const session = require('express-session');
const util = require('./utility');

// Server Side Rendering:
// We use pug to render the individual pages
// In the views folder there are .html and .pug pairs
// If you'd like to add more routes, be sure to add both!
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');

// Parse JSON and Parse Forms (signup/login):
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

app.use(express.static(path.resolve('dist')));

// Enable sessions:
app.use(session({
  secret: 'shhh, it\'s a secret',
  resave: false,
  saveUninitialized: true
}));


// ----------------------------------------------------------------------------
// Public Facing Routes (non-authentication):
{'fraction_non_alphanumeric': 0.2249488752556237, 'fraction_numerical': 0.0, 'mean_word_length': 3.306338028169014, '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': '868117', 'n_tokens_mistral': 694, 'n_tokens_neox': 685, 'n_words': 216}