move JS to server