<commit_before>var Connect = require('./lib/connect');

var controlled = ["/console/", "/files/", "/messages/"];

new Connect.Server([
    // We want to log all http traffic
    {filter: "log"},
    // Add cookie based sessions to the controlled routes
    {filter: "session", routes: controlled},
    // Make sure the user is authenticated
    {filter: "authentication", routes: controlled, param: {}},
    // Restrict access to controlled pages by user rules
    {filter: "authorization", routes: controlled, param: {}},
    // Listen for publish subscribe messages in real-time
    {provider: "pubsub", route: "/messages/", param: {}},
    // This is a logic endpoint, it's ext-direct rpc protocol
    {provider: "direct", route: "/console/", param: {}},
    // Use conditional GET to save on bandwidth
    {filter: "conditional-get"},
    // Cache all rest and static responses
    {filter: "cache"},
    // Gzip all resources when it makes sense
    {filter: "gzip"},
    // This is another logic endpoint, it's a rest-style interface to files
    // {provider: "rest", route: "/files/", param: {}},
    // Finally serve everything else as static files
    {provider: "static", param: __dirname + "/public"},
    // Show pretty pages for exceptions
    {filter: "error-handler"}
]).listen();<commit_msg>Fixed blog example app to use new convention<commit_after>
var controlled = ["/console/", "/files/", "/messages/"];

module.exports = require('./lib/connect').createServer([
    // We want to log all http traffic
    {filter: "log"},
    // Add cookie based sessions to the controlled routes
    {filter: "session", routes: controlled},
    // Make sure the user is authenticated
    {filter: "authentication", routes: controlled, param: {}},
    // Restrict access to controlled pages by user rules
    {filter: "authorization", routes: controlled, param: {}},
    // Listen for publish subscribe messages in real-time
    {provider: "pubsub", route: "/messages/", param: {}},
    // This is a logic endpoint, it's ext-direct rpc protocol
    {provider: "direct", route: "/console/", param: {}},
    // Use conditional GET to save on bandwidth
    {filter: "conditional-get"},
    // Cache all rest and static responses
    {filter: "cache"},
    // Gzip all resources when it makes sense
    {filter: "gzip"},
    // This is another logic endpoint, it's a rest-style interface to files
    // {provider: "rest", route: "/files/", param: {}},
    // Finally serve everything else as static files
    {provider: "static", root: __dirname + "/public"},
    // Show pretty pages for exceptions
    {filter: "error-handler"}
]);
{'fraction_non_alphanumeric': 0.14698063045955184, 'fraction_numerical': 0.0, 'mean_word_length': 3.2144, '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': '5175842', 'n_tokens_mistral': 712, 'n_tokens_neox': 697, 'n_words': 289}