<commit_before>const express = require('express')
const bodyParser = require('body-parser')
const routes = require('./server/routes/index.js')
const cookieSession = require('cookie-session')
const cookieParser = require('cookie-parser')
const config = require('./config/config.js').getConfig();

const app = express()

app.set('view engine', 'ejs')
app.set('views', __dirname + '/views')

app.use(express.static('public'))
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: false }))

app.use((request, response, next) => {
  response.locals.error = ''
  response.locals.user = {}
  next()
})

// app.use(expressSession({
//   secret: process.env.SECRET,
//   resave: false,
//   saveUninitialized: true,
//   cookie: {
//     expires: 600000
//     }
// }))

app.use(cookieSession({
  name: 'session',
  keys: process.env.KEYS,
  maxAge: 24 * 60 * 60 * 1000<commit_msg>more cookie stuff<commit_after>const express = require('express')
const bodyParser = require('body-parser')
const routes = require('./server/routes/index.js')
const expressSession = require('cookie-session')
const cookieParser = require('cookie-parser')
const config = require('./config/config.js').getConfig();

const app = express()

app.set('view engine', 'ejs')
app.set('views', __dirname + '/views')

app.use(express.static('public'))
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: false }))

app.use((request, response, next) => {
  response.locals.error = ''
  response.locals.user = {}
  next()
})

app.use(expressSession({
  secret: process.env.SECRET,
  resave: false,
  saveUninitialized: true,
  cookie: {
    secureProxy: true,
    expires: 600000
    }
{'fraction_non_alphanumeric': 0.17959427207637232, 'fraction_numerical': 0.013126491646778043, 'mean_word_length': 4.571428571428571, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1917096', 'n_tokens_mistral': 559, 'n_tokens_neox': 541, 'n_words': 109}