<commit_before>const path = require("path");
const Maya = require("../").Maya;
const InMemorySessionStore = require("../").InMemorySessionStore;

// Middlewares
const koaViews = require("koa-views");
const koaStatic = require("koa-static-server");
const koaBody = require("koa-short-body");
const session = require("koa-generic-session");


// If you want to use some loader(babel, coffeescript, etc...)
// Write requre register here. (and install using module via `npm`)
// require("babel-register");
// require("coffee-script/register");



const appRoot = __dirname;
const options = Maya.parseArgs(process.argv.slice(2));
const app = new Maya(Object.assign(options, {
    appRoot: appRoot,
}));


// If you want to use middleware.
// Write `app.use(middleware)` here.
app.keys = [app.config.get("session.secret")];
app.use(session({
    key : app.config.get("session.cookieName"),
    store : new InMemorySessionStore(),
    cookie: {
        path : "/",
        signed : true,
        httpOnly : true,
        rewrite : true,
    }
}));

app.use(koaBody({
    formLimit : "5m",
    multipart : true,
}));

app.use(koaViews(path.join(appRoot, "views/"), {
    default : "jade",
    map : {
        "jade" : "jade"
    }<commit_msg>fix invalid file size unit<commit_after>const path = require("path");
const Maya = require("../").Maya;
const InMemorySessionStore = require("../").InMemorySessionStore;

// Middlewares
const koaViews = require("koa-views");
const koaStatic = require("koa-static-server");
const koaBody = require("koa-short-body");
const session = require("koa-generic-session");


// If you want to use some loader(babel, coffeescript, etc...)
// Write requre register here. (and install using module via `npm`)
// require("babel-register");
// require("coffee-script/register");



const appRoot = __dirname;
const options = Maya.parseArgs(process.argv.slice(2));
const app = new Maya(Object.assign(options, {
    appRoot: appRoot,
}));


// If you want to use middleware.
// Write `app.use(middleware)` here.
app.keys = [app.config.get("session.secret")];
app.use(session({
    key : app.config.get("session.cookieName"),
    store : new InMemorySessionStore(),
    cookie: {
        path : "/",
        signed : true,
        httpOnly : true,
        rewrite : true,
    }
}));

app.use(koaBody({
    formLimit : "5mb",
    multipart : true,
}));

app.use(koaViews(path.join(appRoot, "views/"), {
    default : "jade",
    map : {
        "jade" : "jade"
    }
{'fraction_non_alphanumeric': 0.1724415793714746, 'fraction_numerical': 0.0016116035455278, 'mean_word_length': 3.4578096947935366, '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': '3043525', 'n_tokens_mistral': 825, 'n_tokens_neox': 803, 'n_words': 188}