As you start to use Sinatra, you will realize that there are a wide variety of things that you can do with it. This section will teach you all about the most commonly performed tasks and most commonly used features in Sinatra.
They are of the following two types:
Sinatra applications can be created in a single file with very little "boilerplate"—just call
require 'sinatra' and start writing code. The advantage of these applications is that they are easy to create and comprehend, so they reduce the difficulty for beginners.
The following is a small example. We're using the
classic_app.rb file here.
require 'sinatra' get '/' do 'A Sinatra classic application' end