<commit_before>var vf = require('vf'),
    boot = require('vsoft-boot'),
    debug = require('debug')('xlt:vframe'),
    app = vf();

// request pre-processing middleware
app.use(vf.compress());

// using Favicon
app.use(vf.favicon());

// -- Add your pre-processing middleware here --
var bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({ extended: true }));

// Bootstrap application
boot(app, __dirname);


// The access token is only available after boot
app.use(vf.token({
    model: app.models.accessToken
}));

app.use(vf.cookieParser(app.get('cookieSecretXLTPrj')));

app.use(vf.session({
    secret: 'xltprj2015',
    saveUninitialized: true,
    resave: true
}));




// User.create({email: '<EMAIL>', password: '<PASSWORD>'}, function(err, user) {
//   console.log(user);
// }); 

// var Role = app.models.Role;
// var RoleMapping = app.models.RoleMapping;

// Role.create({
//     name: 'admin'
// }, function(err, role) {
//     if (err) return debug(err);
//     debug(role);
//     role.principals.create({
//         principalType: RoleMapping.USER,
//         principalId: "54543604df96d70e39549254"
//     }, function(err, principal) {
//         if (err) return debug(err);
//         debug(principal);
//     });
// });





// User.login({"email": "<EMAIL>", "password": "<PASSWORD>"}, function(err, accessToken) {
//     console.log(accessToken);
//     // User.logout(accessToken.id, function(err) {
//     //     console.log('Logout successful');
//     // });
// });<commit_msg>update role<commit_after>var vf = require('vf'),
    boot = require('vsoft-boot'),
    debug = require('debug')('xlt:vframe'),
    app = vf();

// request pre-processing middleware
app.use(vf.compress());

// using Favicon
app.use(vf.favicon());

// -- Add your pre-processing middleware here --
var bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({ extended: true }));

// Bootstrap application
boot(app, __dirname);


// The access token is only available after boot
app.use(vf.token({
    model: app.models.accessToken
}));

app.use(vf.cookieParser(app.get('cookieSecretXLTPrj')));

app.use(vf.session({
    secret: 'xltprj2015',
    saveUninitialized: true,
    resave: true
}));




// User.create({email: '<EMAIL>', password: '<PASSWORD>'}, function(err, user) {
//   console.log(user);
// }); 

// var Role = app.models.Role;
// var RoleMapping = app.models.RoleMapping;

Role.create({
    name: 'teacher'
}, function(err, role) {
    if (err) return debug(err);
    debug(role);
    role.principals.create({
        principalType: RoleMapping.USER,
        // principalId: "54543604df96d70e39549254",
        principalId: "54547237a72ffa9c23455f57"
    }, function(err, principal) {
        if (err) return debug(err);
        debug(principal);
    });
});





// User.login({"email": "<EMAIL>", "password": "<PASSWORD>"}, function(err, accessToken) {
//     console.log(accessToken);
//     // User.logout(accessToken.id, function(err) {
//     //     console.log('Logout successful');
//     // });
// });
{'fraction_non_alphanumeric': 0.19496238141969252, 'fraction_numerical': 0.021589793915603533, 'mean_word_length': 3.1662125340599454, 'pattern_counts': {'":': 4, '<': 11, '<?xml version=': 0, '>': 11, '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': '4382310', 'n_tokens_mistral': 1067, 'n_tokens_neox': 1014, 'n_words': 195}