By electrolysis of brine solution (very concentrated sodium chloride solution) with running mercury as the cathode and graphite rod as anode.
We will obtain sodium amalgam( an alloy of sodium and mercury), chlorine gas and hydrogen gas.
Add water to sodium amalgam give sodium hydroxide and mercury.
Filter out the mercury and pass chlorine gas into the sodium hydroxide solution to give sodium hypochlorite
That's all I know