title: How to share cookie between front-end app and backend server?
body: <p>In a javascript single page application, on first request of the user to the front-end, a cookie is set with Node JS Express. </p>
  
  <p>Credentials are included to requests by adding the "credentials: include" option to Fetch API.
  The first render is server-side with React server side rendering.</p>
  
  <p>I can see the cookie in developer tools. It is sent on every request to the front-end, but not to the backend.</p>
  
  <p>Front-end and backend are both node servers. In development they are on differents ports of localhost, (also tried setting a domain in hosts file but no difference). In staging the api server is on a subdomain of the front-server domain. Neither works.</p>
  
  <p>Can they share the same cookie or should I create one cookie for each? I can't seem to set the cookie for the requests to the backend, either because different port in dev or different subdomain in staging. </p>