extract javascript from index.html
migrate from bootstrap to ratchet. connect to api