title: SEO with express.js and prerender-node
body: <p><strong>Front-end:</strong>   </p>
  
  <p>I have SPA client website that uses own routing system. For instance it has route <code>http://localhost:8080/about</code></p>
  
  <p><strong>Back-end:</strong>   </p>
  
  <p>I'm using prerender-node on express.js server (runs on port 3001) to prerender static html for crawler bots:</p>
  
  <pre><code>app.use(require('prerender-node')
      .set('prerenderServiceUrl', 'http://localhost:3000/')
      .set('afterRender', function (err, req, prerender_res) {
          console.log('URL: ', req.url); // here I see: "/about?_escaped_fragment_="
      }));
  </code></pre>
  
  <p>my express routing looks like this:</p>
  
  <pre><code>router.get('*', function (req, res, next) {
      res.sendFile(path.resolve('../frontend/dist/index.html'));
  });
  </code></pre>
  
  <p><strong>Problem:</strong>   </p>
  
  <p>The problem is that if I send <code>http://localhost:3001/about?_escaped_fragment_=</code> to the server as a response I get static index.html home page (but I wanted to prerender about section).</p>
  
  <p>As I understand prerender-node middleware doesn't know how to navigate to /about section and prerenders always home page.</p>
  
  <p><strong>Question:</strong></p>
  
  <p>How to prerender the actual about page of my SPA according to a link?</p>