split rainbowreader.js into client/main.js and server/main.js