var express = require('express');
var http = require('http');
var bodyParser = require('body-parser');
var eth = require('./eth');
var eventapi = require('./eventapi');
var api = require('./api');

var app = express();
var server = http.Server(app);
var io = require('socket.io')(server);

app.use(express.static(__dirname + '/public'));
app.use(bodyParser.json());
app.use('/api/', api);

eth.prepare()
  .then(() => eventapi.attach(io))
  .then(() => {
    const port = process.env.PORT || 3000;
    console.log(`Listening to port ${port}`);
    server.listen(port);
  })
  .catch(err => {
    console.log(err);
  });

@@ -1,11 +1,13 @@
-var
+const
  express
@@ -29,19 +29,21 @@
 ress');%0A
-var
+const
  http = 
@@ -59,19 +59,21 @@
 http');%0A
-var
+const
  bodyPar
@@ -102,19 +102,21 @@
 rser');%0A
-var
+const
  eth = r
@@ -132,19 +132,21 @@
 /eth');%0A
-var
+const
  eventap
@@ -172,19 +172,21 @@
 tapi');%0A
-var
+const
  api = r
@@ -203,19 +203,21 @@
 api');%0A%0A
-var
+const
  app = e
@@ -226,19 +226,21 @@
 ress();%0A
-var
+const
  server 
@@ -263,11 +263,13 @@
 p);%0A
-var
+const
  io 

Change var to const for consistency.