title: Integrate PHP sessions with Vue/Node.js
body: <p>I have a PHP application which authenticates user, execute MySQL queries and relies on <code>$_SESSION</code> cookie.</p>
  
  <p>Everything was working fine but I realized I need to do more with Frontend and hence had to use Vue.js and websockets.</p>
  
  <p>Therefore, I used node.js for primary domain <code>localhost</code> (for production sake)</p>
  
  <p>I made PHP API available on <code>localhost:8080</code> so that Vue.js could communicate with PHP Backend.</p>
  
  <p>Now, Here's my problem</p>
  
  <p>How can I use/store <code>$_SESSION ID</code> in Vue/Websocket and send it along with every request made to PHP server?</p>
  
  <p>I did some research on stackoverflow and found <code>session_id()</code> which could return current Session ID but I have no clue about how to integrate PHP with Vue.</p>
  
  <p><strong>Note: I am using Vue.js (Vue, router, Vuex) and socket.io with Node.js</strong></p>