title: Open browser popup on APIrequest nodejs express
body: <p>I want to open a browser popup for client site on rest api request to nodejs backend.<br/>
  I had tried</p>
  
  <pre><code>res.setHeader('Content-Type', 'text/html');
  res.render('index', { title: 'Hey', message: 'Hello' });
  </code></pre>
  
  <p>But it still returning html codes as data to the client.<br/>
  I also used <code>window.open</code> but <code>window is not defined</code> in server side
  <br/>
  Is there anyway to make my backend redirect or render html form on api request!
  <br/>
  the following image is how the client get response<br/></p>
  
  <p><a href="https://i.stack.imgur.com/IPgQE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IPgQE.jpg" alt="Response Output"></a></p>