1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
Classy web-development dressed in a DSL (official / canonical repo)
Find a file
Blake Mizerany a4da442ccf * Pretty up default pages
* Echo
2007-10-01 20:56:34 -07:00
examples * Pretty up default pages 2007-10-01 20:56:34 -07:00
files * Pretty up default pages 2007-10-01 20:56:34 -07:00
lib layouts in dsl 2007-10-01 18:11:21 -07:00
site * Pretty up default pages 2007-10-01 20:56:34 -07:00
test Rendering refactoring with layouts 2007-10-01 01:10:46 -07:00
vendor Rendering refactoring with layouts 2007-10-01 01:10:46 -07:00
CHANGELOG * Pretty up default pages 2007-10-01 20:56:34 -07:00
Manifest * Pretty up default pages 2007-10-01 20:56:34 -07:00
RakeFile * Pretty up default pages 2007-10-01 20:56:34 -07:00
README * README w/MIT 2007-09-11 01:14:00 +00:00

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.


Using Sinatra is EASY!

WARNING:  Keep a fresh pair of underwear nearby.  You may need them when you see this.

Get running without a file!

ruby -e 'require "sinatra"'  # HIT http://localhost:4567/ and BAM!

now create a file called test.rb (or whatever you fancy) and enter this:

require 'sinatra'

get '/' do
  body 'Hello World!'
end

now run 'ruby test.rb' and refresh your browser

Oh yeah!