<commit_before>var express = require('express');
var request = require('request');
var yahooProxy = require('./yahooProxy.js')();
var app = express();

app.configure(function(){
  app.set('port', process.env.PORT || 3000);

  app.use(express.favicon());
});

app.get('/', function(req, res){
  res.send(	'<html><head></head>	<body>		<header><h1>Yahoo-proxy How-To</h1></header>		<section><p><a target="_blank" href="/quotes?tickers=Algeta.OL,YOHOO">Get quotes for Algeta and Yahoo</a></p></section>		<section><p><a target="_blank" href="/tickers?search=Alget">Search for ticker starting with Alget</a></p></section>	</body>	</html>')
});

console.log("proxy", yahooProxy);

app.get('/quotes', function(req, res){
	var tickers = req.query.tickers;	

	yahooProxy.getQuotes(tickers, function(error,data)
    	{
    	   	sendAsCORSSafeJSON(res,data);
    	}   
    );   
});
app.get('/tickers', function(req, res){
		var search = req.query.search;	
		yahooProxy.searchTickers(search, function(error,data)
	    	{
	    	   	sendAsCORSSafeJSON(res,data);
	    	}   
	    );   
  });   


function sendAsCORSSafeJSON(res,data)
{
	res.setHeader('Access-Control-Allow-Origin', '*');
    res.setHeader('Content-Type', 'application/json; charset=utf-8');
    res.send(data);

}



app.listen(3000);
console.info('Listening on port 3000');<commit_msg>fixing app start to work in heroku<commit_after>var express = require('express');
var request = require('request');
var yahooProxy = require('./yahooProxy.js')();
var app = express();

app.configure(function(){
  app.set('port', process.env.PORT || 3000);

  app.use(express.favicon());
});

app.get('/', function(req, res){
  res.send(	'<html><head></head>	<body>		<header><h1>Yahoo-proxy How-To</h1></header>		<section><p><a target="_blank" href="/quotes?tickers=Algeta.OL,YOHOO">Get quotes for Algeta and Yahoo</a></p></section>		<section><p><a target="_blank" href="/tickers?search=Alget">Search for ticker starting with Alget</a></p></section>	</body>	</html>')
});

console.log("proxy", yahooProxy);

app.get('/quotes', function(req, res){
	var tickers = req.query.tickers;	

	yahooProxy.getQuotes(tickers, function(error,data)
    	{
    	   	sendAsCORSSafeJSON(res,data);
    	}   
    );   
});
app.get('/tickers', function(req, res){
		var search = req.query.search;	
		yahooProxy.searchTickers(search, function(error,data)
	    	{
	    	   	sendAsCORSSafeJSON(res,data);
	    	}   
	    );   
  });   


function sendAsCORSSafeJSON(res,data)
{
	res.setHeader('Access-Control-Allow-Origin', '*');
    res.setHeader('Content-Type', 'application/json; charset=utf-8');
    res.send(data);

}



app.listen(app.get('port'), function(){
  console.log('Express server listening on port ' + app.get('port'));
});
{'fraction_non_alphanumeric': 0.19891107078039927, 'fraction_numerical': 0.007985480943738656, 'mean_word_length': 4.351456310679612, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, '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': '4946911', 'n_tokens_mistral': 1044, 'n_tokens_neox': 978, 'n_words': 158}