<commit_before>var
  express = require('express'),
  cookieParser = require('cookie-parser'),
  bodyParser = require('body-parser'),
  expressSession = require('express-session'),
  browserSync = require('browser-sync'),
  passport = require('passport'),
  GoogleStrategy = require('passport-google-oauth').OAuth2Strategy,
  https = require('https'),
  http = require('http'),
  app = express(),
  config = require('./config.json'),
  HTTP_PORT = process.env.HTTP_PORT || 8888,
  SOCKET_PORT = process.env.SOCKET_PORT || 3000,
  server,
  io;

https.globalAgent.maxSockets = config.maxSockets || 5;
http.globalAgent.maxSockets = config.maxSockets || 5;

app.use(cookieParser());
app.use(expressSession({secret: config.sessionKey, resave: true, saveUninitialized: true}));
app.use(bodyParser.urlencoded({extended: true}));
app.use(passport.initialize());
app.use(passport.session());

require('./routes/auth.js')(app, {
  config: config,
  passport: passport,
  GoogleStrategy: GoogleStrategy
});
require('./routes/user.js')(app);

app.use(express.static(__dirname + '/dist'));

server = app.listen(HTTP_PORT, function () {
  console.log('Express server listening on port %d', server.address().port);
});

// Socket.io server
io = require('socket.io')(server);
require('./server-socket.js')(app, {
  config: config,
  io: io
});

// Start server
io.listen(SOCKET_PORT);
console.log('Socket.io server listening on port %d', SOCKET_PORT);
<commit_msg>Launch devicewall and devicewallapp servers at the same time<commit_after>var
  express = require('express'),
  cookieParser = require('cookie-parser'),
  bodyParser = require('body-parser'),
  expressSession = require('express-session'),
  browserSync = require('browser-sync'),
  passport = require('passport'),
  GoogleStrategy = require('passport-google-oauth').OAuth2Strategy,
  https = require('https'),
  http = require('http'),
  config = require('./config.json'),
  deviceWallApp = require('sc5-devicewall-app'),
  io;

https.globalAgent.maxSockets = config.maxSockets || 5;
http.globalAgent.maxSockets = config.maxSockets || 5;

// Admin server starts
var adminServer = express();
adminServer.use(cookieParser());
adminServer.use(expressSession({secret: config.sessionKey, resave: true, saveUninitialized: true}));
adminServer.use(bodyParser.urlencoded({extended: true}));
adminServer.use(passport.initialize());
adminServer.use(passport.session());

require('./routes/auth.js')(adminServer, {
  config: config,
  passport: passport,
  GoogleStrategy: GoogleStrategy
});
require('./routes/user.js')(adminServer);

adminServer.use(express.static(__dirname + '/dist'));

var admin = adminServer.listen(config.adminPort, function () {
  console.log('Express server listening on port %d', admin.address().port);
});
// Admin server ends

// Socket.io server starts
io = require('socket.io')(admin);
require('./server-socket.js')(adminServer, {
  config: config,
  io: io
});

// Start server
io.listen(config.socketPort);
console.log('Socket.io server listening on port %d', config.socketPort);
// Socket.io server ends

// App server starts
var appServer = express();
appServer.use(deviceWallApp);
appServer.use('/return', deviceWallApp);
appServer.use('/main', deviceWallApp);

var app = appServer.listen(config.appPort, function () {
  console.log('Express server listening on port %d', app.address().port);
});
// App server ends

{'fraction_non_alphanumeric': 0.16765053128689492, 'fraction_numerical': 0.004427390791027155, 'mean_word_length': 5.567829457364341, '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': '1935373', 'n_tokens_mistral': 1042, 'n_tokens_neox': 1033, 'n_words': 214}