title: How to use Socket io with Koa route get and post methods and with Koa-passport?
body: <p>My app is simple login registration app.
  Using Koa 2.0, Koa-route, Koa-passport, passport-local, passport-google-auth.</p>
  
  <p>I want to use chat functionality with this app and want to create Socket.io connection when user is logged in and disconnect when logout or exit.</p>
  
  <p>But if I use socket.io then my other functions are not working.</p>
  
  <p>I can route through pages but  route.post methods are not working,</p>
  
  <p>and also how can I access ctx.passport.user in io.on </p>
  
  <p>I am using swig for templating.</p>