<commit_before>var restify = require('restify');
var mongoose = require('mongoose');
var path = require('path');
var router = require('./lib/router.js');

var server = restify.createServer({
    name: 'watchlist',
    version: '1.0.0'
});

server.use(restify.acceptParser(server.acceptable));
server.use(restify.queryParser());
server.use(restify.bodyParser());

mongoose.connect('mongodb://localhost/test');

server.get(/\/static\/?.*/, restify.serveStatic({
    directory: path.resolve('../client/dist'),
    default: 'index.html'
}));


var modelpath = './models';
require("fs").readdirSync(modelpath).forEach(function(model){
    console.log('load model: ' + model);
    require(modelpath +'/'+ model);
});

var controllerpath = './controllers';
require("fs").readdirSync(controllerpath).forEach(function(controller){
    var ctrl = require(controllerpath +'/'+ controller);
    if(ctrl.init){
        console.log('load controller: ' + controller);
        ctrl.init(server,router);
    }
    else
        console.log('controller not loaded: ' + controller);
});

server.listen(3000, function(){
   console.log('%s listening at %s', server.name, server.url);
});<commit_msg>Initial Commit<commit_after>var restify = require('restify');
var mongoose = require('mongoose');
var path = require('path');
var router = require('./lib/router.js');
var passport = require('passportjs');

var server = restify.createServer({
    name: 'watchlist',
    version: '1.0.0'
});

server.use(restify.acceptParser(server.acceptable));
server.use(restify.queryParser());
server.use(restify.bodyParser());

mongoose.connect('mongodb://localhost/test');

server.get(/\/static\/?.*/, restify.serveStatic({
    directory: path.resolve('../client/dist'),
    default: 'index.html'
}));


var modelpath = './models';
require("fs").readdirSync(modelpath).forEach(function(model){
    console.log('load model: ' + model);
    require(modelpath +'/'+ model);
});

var controllerpath = './controllers';
require("fs").readdirSync(controllerpath).forEach(function(controller){
    var ctrl = require(controllerpath +'/'+ controller);
    if(ctrl.init){
        console.log('load controller: ' + controller);
        ctrl.init(server,router);
    }
    else
        console.log('controller not loaded: ' + controller);
});

server.use(pasport.initialize());

server.listen(3000, function(){
   console.log('%s listening at %s', server.name, server.url);
});
{'fraction_non_alphanumeric': 0.19218106995884773, 'fraction_numerical': 0.005761316872427984, 'mean_word_length': 4.6013824884792625, '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': '2175520', 'n_tokens_mistral': 752, 'n_tokens_neox': 740, 'n_words': 133}