 
 # work around frame handler bug in socket.io v0.9.16
 require("./socket.io.patch.js") 
-
 # Set up socket.io server
 app = express()
-Metrics.injectMetricsRoute(app)
+
 server = require('http').createServer(app)
 io = require('socket.io').listen(server)
 


rclient = require("redis-sharelatex").createClient(Settings.redis.realtime)

app.get "/health_check/redis", (req, res, next) ->
	rclient.healthCheck (error) ->
		if error?
			logger.err {err: error}, "failed redis health check"

cookieParser = CookieParser(Settings.security.sessionSecret)

sessionSockets = new SessionSockets(io, sessionStore, cookieParser, Settings.cookieName)

Metrics.injectMetricsRoute(app)
app.use(Metrics.http.monitor(logger))

io.configure ->
	io.enable('browser client minification')
