title: How to add SSR to existing React.js application in Express.js
body: <p>I have simple React application and I want to add SSR in Express.js.</p>
  <p>I made a bit of a gaff in the beginning and in my repository I just have a frontend folder and in it the whole React app with typescript, babel and webpack configured.</p>
  <p>I haven't played with SSR yet, so I'm curious, if I want to make such a server and have its file in the folder next to the frontend folder, would I have to install and set all the dependencies I made inside the`frontend folder, and only then create the server.js file ?</p>
  <p>Then in the middle of &quot;frontend/src&quot; I would have 2 files - index.tsx (with React.render() method), because I would like to be able to run the application also without the server. And 2nd file would be indexServer.tsx with React.hydrate() method, which would go to server.js file (i.e. would be for generating application by server). Is this concept right ?</p>
  <p>Link to my github repo with this react app: <a href="https://github.com/poldeeek/spider-game" rel="nofollow noreferrer">https://github.com/poldeeek/spider-game</a></p>