<commit_before>var express = require('express');
var app = express();
var marked = require('marked');
var fs = require('fs');
var path = require('path');
marked.setOptions({
	renderer: new marked.Renderer(),
	gfm: true,
	tables: true,
	breaks: true,
	pedantic: false,
	sanitize: true,
	smartLists: true,
	smartypants: false
});
app.use(express.static('public',{maxAge:12*60*60*24*30}));
app.all('*', function(req, res, next) {
    res.header("Access-Control-Allow-Origin", "*");
    // res.header("Access-Control-Allow-Headers", "X-Requested-With");
    // res.header("Access-Control-Allow-Methods","PUT,POST,GET,DELETE,OPTIONS");
    // res.header("X-Powered-By",' 3.2.1')
    // res.header("Content-Type", "application/json;charset=utf-8");
    next();
});
var formate = require('./datetime.js');//格式化日期

/********************获取文章列表********************************/
app.get('/api/blog/posts',function(req,res){
  console.log("requesting all blogs........")
	var posts = [];
  fs.readdir('./public/blog/posts',function(err,files){
		if(err){<commit_msg>Update server<commit_after>var express = require('express');
var app = express();
var marked = require('marked');
var fs = require('fs');
var path = require('path');
var serveStatic = require('serve-static');
app.use(serveStatic(__dirname));
marked.setOptions({
	renderer: new marked.Renderer(),
	gfm: true,
	tables: true,
	breaks: true,
	pedantic: false,
	sanitize: true,
	smartLists: true,
	smartypants: false
});
app.use(express.static('public',{maxAge:12*60*60*24*30}));
app.all('*', function(req, res, next) {
    res.header("Access-Control-Allow-Origin", "*");
    // res.header("Access-Control-Allow-Headers", "X-Requested-With");
    // res.header("Access-Control-Allow-Methods","PUT,POST,GET,DELETE,OPTIONS");
    // res.header("X-Powered-By",' 3.2.1')
    // res.header("Content-Type", "application/json;charset=utf-8");
    next();
});
var formate = require('./datetime.js');//格式化日期

/********************获取文章列表********************************/
app.get('/api/blog/posts',function(req,res){
  console.log("requesting all blogs........")
	var posts = [];
  fs.readdir('./public/blog/posts',function(err,files){
		if(err){
{'fraction_non_alphanumeric': 0.2586996336996337, 'fraction_numerical': 0.01282051282051282, 'mean_word_length': 5.086350974930362, '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': '1493018', 'n_tokens_mistral': 759, 'n_tokens_neox': 744, 'n_words': 122}