Playing with sinatra and D3
I used word d3-cloud project by Jason Davies
https://github.com/jasondavies/d3-cloud
In order to use JS libraries and frameworks like angular, D3, etc. some of your routes have to return JSON which will be used by JS framework in another route (that happens via AJAX) - take a look at views/home.slim for such an example.
Modules that are in separate files should be in lib/sinatra directory and be in module Sinatra. See helpers.rb.
bundle exec rackup -p 3000
This will run on port 3000 on the local machine.
The app url is: http://pacific-beach-1447.herokuapp.com