<commit_before>var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var session = require('express-session');
var multer = require('multer');


var routes = require('./routes/index');
var users = require('./routes/users');
var dev = require('./routes/dev');
var masterApp = require('./routes/masterApp');
var miniMasterApp = require('./routes/miniMasterApp');
var managers = require('./routes/managers');
var category = require('./routes/category');
var scene = require('./routes/scene');


var app = express();

app.use(session({
    secret: 'secret',
    cookie: {
        maxAge: 1000 * 60 * 30
    }
}));

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));


app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
//app.use(multer());
app.use(cookieParser());

app.use(function (req, res, next) {
    res.locals.user = req.session.user;
    var err = req.session.error;
    delete req.session.error;
    res.locals.message = "";
    if (err) {
        res.locals.message = '<div class="alert alert-danger" style="margin-bottom:20px;color:red;">' + err + '</div>';
    }
    next();
});

//app.use(express.static(path.join(__dirname, 'public')));

//app.use('/', routes);
app.use('/', express.static(path.join(__dirname, 'public/ace')));
app.use('/users', users);
app.use('/dev', dev);
app.use('/masterApp', masterApp);<commit_msg>增加静态SRC路由<commit_after>var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var session = require('express-session');
var multer = require('multer');


var routes = require('./routes/index');
var users = require('./routes/users');
var dev = require('./routes/dev');
var masterApp = require('./routes/masterApp');
var miniMasterApp = require('./routes/miniMasterApp');
var managers = require('./routes/managers');
var category = require('./routes/category');
var scene = require('./routes/scene');


var app = express();

app.use(session({
    secret: 'secret',
    cookie: {
        maxAge: 1000 * 60 * 30
    }
}));

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));


app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
//app.use(multer());
app.use(cookieParser());

app.use(function (req, res, next) {
    res.locals.user = req.session.user;
    var err = req.session.error;
    delete req.session.error;
    res.locals.message = "";
    if (err) {
        res.locals.message = '<div class="alert alert-danger" style="margin-bottom:20px;color:red;">' + err + '</div>';
    }
    next();
});

//app.use(express.static(path.join(__dirname, 'public')));

//app.use('/', routes);
app.use('/', express.static(path.join(__dirname, 'public/ace')));
app.use('/src', express.static(path.join(__dirname, 'public/control-src')));
app.use('/users', users);
app.use('/dev', dev);
app.use('/masterApp', masterApp);
{'fraction_non_alphanumeric': 0.21231119977201482, 'fraction_numerical': 0.005699629524080934, 'mean_word_length': 4.60702875399361, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '383629', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1126, 'n_words': 240}