Linking JS to backend to process votes from the index