title: Broadcast express session expiration to web client
body: <p>I am using express.session to set the expiry of the session. Since there is a session maintain between server and client, is it possible for node server to broadcast to client to notify that the client session is going to expire(Eg: 5 minutes before expiry)?</p>
  
  <p>1) A session is established between node server and client. Session in server is stored in mongodb. <br>
  2) When session is going to expire 5 minutes before, server send notifications to client.<br>
  3) Client browser prompt an alert box to user.</p>
  
  <pre><code>app.use(express.session({
      cookie  : { maxAge  : new Date(Date.now() + (60 * 1000 * 30)) }
  }));
  </code></pre>