<commit_before>var express = require('express');
var app = express();
//var sslRedirect = require('heroku-ssl-redirect');
const fs = require('fs');
const options = {
  key: fs.readFileSync('./key.pem'),
  cert: fs.readFileSync('./key-cert.pem')
};

//var server = require('https').createServer(options,app)
var server = require('http').Server(app);
var io = require('socket.io')(server)
var path = require('path');
var cors = require('cors')
var bodyParser = require('body-parser')

var httpProxy = require('http-proxy');
var proxy = httpProxy.createProxyServer();

var isProduction = process.env.NODE_ENV === 'production';
var port = isProduction ? process.env.PORT : 3000;
var publicPath = path.resolve(__dirname, 'public');

app.use(express.static(publicPath));
app.use(bodyParser.json());
app.use(cors());
app.use(sslRedirect());


// We only want to run the workflow when not in production
if (!isProduction) {
  // Any requests to localhost:3000/build is proxied
  // to webpack-server
  app.all('/build/*', function (req, res) {
    proxy.web(req, res, {
        target: 'http://localhost:8080'
    });
  });
}

// add stock to db
app.post('/add-stock-to-db',function(req,res){
  var dataset = req.body.dataset;
  io.sockets.emit('new_stock_added',{
          dataset: dataset
  })
  res.end()
})<commit_msg>removed depedency<commit_after>var express = require('express');
var app = express();
const fs = require('fs');
const options = {
  key: fs.readFileSync('./key.pem'),
  cert: fs.readFileSync('./key-cert.pem')
};

//var server = require('https').createServer(options,app)
var server = require('http').Server(app);
var io = require('socket.io')(server)
var path = require('path');
var cors = require('cors')
var bodyParser = require('body-parser')

var httpProxy = require('http-proxy');
var proxy = httpProxy.createProxyServer();

var isProduction = process.env.NODE_ENV === 'production';
var port = isProduction ? process.env.PORT : 3000;
var publicPath = path.resolve(__dirname, 'public');

app.use(express.static(publicPath));
app.use(bodyParser.json());
app.use(cors());
//app.use(sslRedirect());


// We only want to run the workflow when not in production
if (!isProduction) {
  // Any requests to localhost:3000/build is proxied
  // to webpack-server
  app.all('/build/*', function (req, res) {
    proxy.web(req, res, {
        target: 'http://localhost:8080'
    });
  });
}

// add stock to db
app.post('/add-stock-to-db',function(req,res){
  var dataset = req.body.dataset;
  io.sockets.emit('new_stock_added',{
          dataset: dataset
  })
  res.end()
})
{'fraction_non_alphanumeric': 0.1803405572755418, 'fraction_numerical': 0.009287925696594427, 'mean_word_length': 4.340909090909091, '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': '1001234', 'n_tokens_mistral': 865, 'n_tokens_neox': 831, 'n_words': 198}