Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If top-level, then something like this: We
connect the sinatra library
We say that we accept GET requests when accessing the root directory of the web server
We specify what our web server will return when accessing a specific path ( / ), the last line is usually the value that the function returns. Closing the previously opened block with the do
keyword
require 'sinatra'
get '/' do
'Hello world!'
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question