Boilerplate for writing a webserver with Sinatra, tested with rspec and Capybara
- RVM (or using Ruby 2.6)
$ rvm use 2.6.3
- Bundler, for managing gems (
$ gem install bundler
) - Rake, for managing tasks (
$ gem install rake
)
- Clone it
$ bundle install
$ rake
$ rake web
I like using entr (brew install entr
) because it's a language-agnostic way of restarting a process rather than faffing around with nodemon or whatever. More unix-y.
$ ag --ruby -l | entr -r -c rake web
or for tests
$ ag --ruby -l | entr -r -c rake