<commit_before>app = {}
express = require 'express'
x = app.x = express()

# Setup the config
env = x.settings.env
env = 'development' unless env
config = require('../config/config')[env]
config = require('../config/config')['development'] unless config
app.config = config

# Use connect-assets
x.use require('connect-assets')()

# Parse bodies - required for forms
x.use express.bodyParser()

# Set up static files
x.use express.static __dirname + '/../public'
console.log __dirname

# Setup jade
x.set 'view engine', 'jade'
x.set 'view options', pretty: yes
x.set 'views', __dirname + '/../app/views'

# Load controllers
app.controllers = require './controllers'

# Load db
mongoose = require 'mongoose'
mongoose.connect config.dburl

# Register all routes
router = app.router = new (require('./router'))(app)
require('../config/routes')(router)

x.listen config.port
console.log 'App listening on port ' + config.port<commit_msg>Add cookie/session middleware<commit_after>app = {}
express = require 'express'
x = app.x = express()

# Setup the config
env = x.settings.env
env = 'development' unless env
config = require('../config/config')[env]
config = require('../config/config')['development'] unless config
app.config = config

# Use connect-assets
x.use require('connect-assets')()

# Parse bodies - required for forms
x.use express.bodyParser()

# Use sessions
x.use express.cookieParser()
x.use express.session secret: 'i dont think it matters if my secret is on github'

# Set up static files
x.use express.static __dirname + '/../public'
console.log __dirname

# Setup jade
x.set 'view engine', 'jade'
x.set 'view options', pretty: yes
x.set 'views', __dirname + '/../app/views'

# Load controllers
app.controllers = require './controllers'

# Load db
mongoose = require 'mongoose'
mongoose.connect config.dburl

# Register all routes
router = app.router = new (require('./router'))(app)
require('../config/routes')(router)

x.listen config.port
console.log 'App listening on port ' + config.port
{'fraction_non_alphanumeric': 0.14683922349427575, 'fraction_numerical': 0.0, 'mean_word_length': 4.403225806451613, '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': '4474647', 'n_tokens_mistral': 619, 'n_tokens_neox': 619, 'n_words': 195}