Split main js in client and server js