How do I detect I am on server vs client in Next.js : <p>I am using a customer express server with Next.js. It's running within a container. I am doing an http request with <code>isomorphic-fetch</code> to get data for my render. I'd like to do <code>localhost</code> when running on server and <code>mysite.com</code> when running on client. Not sure the best way to accomplish this. I can do it hackily by doing <code>const isServer = typeof window === 'undefined'</code> but that seems pretty bad. </p>
