Middleware to server pre-rendered snapshots of SPA ( single page app