<commit_before>require('dotenv').load()
var express 	= require('express');
var	http 			= require('http');
var logger 		=	require('morgan');
var bcrypt 		= require('bcrypt');
var User      = require('./models/user');
var usersController = require('./controller/usersController');
var methodOverride = require('method-override');

var io = require('socket.io')(server); //invokes socket.io which will handle all connections and responses using server.
var Twit = require('twit');
var twitter = new Twit({
  consumer_key: process.env.TWITTER_CONSUMER_KEY,
  consumer_secret: process.env.TWITTER_CONSUMER_SECRET,
  access_token: process.env.TWITTER_ACCESS_TOKEN,
  access_token_secret: process.env.TWITTER_ACCESS_TOKEN_SECRET
});


// set up mongoose and db-related
var mongoose = require('mongoose');
// mongoose.connect('mongodb://localhost/cpsdb');
// mongoose.connect('mongodb://'<dbuser>':<db<EMAIL>>@<EMAIL>:33113/heroku_c39vv1nx')
var mongodbUri = process.env.MONGODBURI
mongoose.connect(mongodbUri)
var db = mongoose.connection;
db.on("error", console.error.bind(console, "connection error: "));
db.once('connected. rejoice for we are connected at:' +mongodbUri, function(callback){console.log('connected to mongo')});
// set up bodyparser
var bodyParser = require('body-parser')

/*
	Create an express webapp.  This will allow us to serve
	static files in the ./public directory
*/
var app = express();
app.set('port', process.env.PORT || 3000);
app.use(express.static(__dirname + '/public'));
// use logger to show requests to the console
app.use(logger('dev'));
// parse incoming json
app.use(bodyParser.json());
var server = require('http').createServer(app); //setup for websocket application

//// ROUTES
// create an instance for the API routes
var apiRouter = express.Router();
	console.log(apiRouter);

apiRouter.use(function(req, res, next){
	console.log(req);
	next();
})<commit_msg>This is the a revised app to use socket and twit and the mongodb remote info<commit_after>require('dotenv').load()
var express 	= require('express');
var	http 			= require('http');
var logger 		=	require('morgan');
var bcrypt 		= require('bcrypt');
var User      = require('./models/user');
var usersController = require('./controller/usersController');
var methodOverride = require('method-override');
var io = require('socket.io')(server); //invokes socket.io which will handle all connections and responses using server.
var Twit = require('twit');

var twitter = new Twit({
  consumer_key: process.env.TWITTER_CONSUMER_KEY,
  consumer_secret: process.env.TWITTER_CONSUMER_SECRET,
  access_token: process.env.TWITTER_ACCESS_TOKEN,
  access_token_secret: process.env.TWITTER_ACCESS_TOKEN_SECRET
});


// set up mongoose and db-related
var mongoose = require('mongoose');
var mongodbUri = process.env.MONGODBURI
mongoose.connect(mongodbUri)
var db = mongoose.connection;
db.on("error", console.error.bind(console, "connection error: "));
db.once('connected. rejoice for we are connected at:' +mongodbUri, function(callback){console.log('connected to mongo')});
// set up bodyparser
var bodyParser = require('body-parser')

/*
	Create an express webapp.  This will allow us to serve
	static files in the ./public directory
*/
var app = express();
app.set('port', process.env.PORT || 3000);
app.use(express.static(__dirname + '/public'));
// use logger to show requests to the console
app.use(logger('dev'));
// parse incoming json
app.use(bodyParser.json());
var server = require('http').createServer(app); //setup for websocket application

//// ROUTES
// create an instance for the API routes
var apiRouter = express.Router();
	console.log(apiRouter);

apiRouter.use(function(req, res, next){
	console.log(req);
	next();
})
{'fraction_non_alphanumeric': 0.14558152027934462, 'fraction_numerical': 0.0042976094547408005, 'mean_word_length': 5.333333333333333, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3147748', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1158, 'n_words': 313}