//when we go to deployment, switch to "express" as the server
// var webpack = require('webpack-dev-server');
// var app = webpack();
var express = require('express')
var app = express();
var path = require('path')
var port = 8080;


var teachers_routes = require('./routes/teacher')

console.log(teachers_routes)

app.use('/teachers', teachers_routes)

app.use(express.static(path.join(__dirname, 'public')));

app.set('views', __dirname + '/views');
app.set('view engine', 'ejs')

var server = app.listen(port, function(){
	var host = server.address().address;
	var port = server.address().port;
	console.log('Listening on http://', host, port)
});


@@ -208,16 +208,59 @@
 'path')%0A
+var io = require('socket.io').listen(app);%0A
 var port
@@ -684,12 +684,172 @@
  port)%0A%7D);%0A%0A
+%0Aio.of('teacher').on('connection', function(socket)%7B%0A  console.log('data received');%0A  socket.on('start', function(data)%7B%0A    io.emit('start', data);%0A  %7D)%0A%0A%7D)%0A%0A

add socket.io