Where socket.io should be initialized in MERN?
I am working on a React project and following MERN boiler plate.In my project I am using socket.io for updating component state in real time. What is the most appropriate way of defining socket object in MERN so that it can be accessed through out application P.S : each component is defined in a separate .js file