<commit_before>var express = require('express');
var bodyParser = require('body-parser');
var app = express();

var medium = require('./scrapers/medium-scraper');

app.use(bodyParser.json());

var router = express.Router();
app.use(router);

// Allow CORS
app.all('*', function(req, res, next) {
    res.header("Access-Control-Allow-Origin", "*");
    res.header("Access-Control-Allow-Headers", "X-Requested-With");
    next();
});

app.get('/user/:username', medium.getUser);
app.get('/user/:username/info', medium.getUserInfo);
app.get('/posts/:tag/:limit', medium.getPostsByTag);

// Give a hello world response to all GET requests 
app.get('/',function(req,res){
  res.sendFile(__dirname + '/index.html');
});


var port = process.env.PORT || 5000;<commit_msg>Ping every 30-60 minutes to keep alive<commit_after>var express = require('express');
var bodyParser = require('body-parser');
var http = require("http");
var app = express();

var medium = require('./scrapers/medium-scraper');

app.use(bodyParser.json());

var router = express.Router();
app.use(router);

// Allow CORS
app.all('*', function(req, res, next) {
    res.header("Access-Control-Allow-Origin", "*");
    res.header("Access-Control-Allow-Headers", "X-Requested-With");
    next();
});

app.get('/user/:username', medium.getUser);
app.get('/user/:username/info', medium.getUserInfo);
app.get('/posts/:tag/:limit', medium.getPostsByTag);

// Give a hello world response to all GET requests 
app.get('/',function(req,res){
  res.sendFile(__dirname + '/index.html');
});


setInterval(function() {
    http.get("http://medium-motaheri.rhcloud.com");
}, 1800000 + 1800000*Math.random()); // every 30 minutes + [0-1] * 30 

var port = process.env.PORT || 5000;
{'fraction_non_alphanumeric': 0.20520231213872833, 'fraction_numerical': 0.018497109826589597, 'mean_word_length': 4.712871287128713, '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': '1134162', 'n_tokens_mistral': 596, 'n_tokens_neox': 568, 'n_words': 115}