Demo entry 3506188

sinatra

   

Submitted by anonymous on Jan 06, 2016 at 04:52
Language: Ruby. Code size: 876 Bytes.

require "rubygems"
require "sinatra"
require "json"

get "/code" do
  content_type :json
 { "code" => 'require "rubygems" require "sinatra" require "json" get "/code" do content_type :json { "code" =>  }.to_json end' }.to_json
end

get "/home" do
  erb :html
end

##### VIEWS ######
__END__

@@html
<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Sinatra App</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  </head>
  <body>
    <br><br>
    <center><h3>This is the code for a single file sinatra app</h3></center>
<div class="container">
  <div class="row">
    <center><div class="well col-md-8 col-md-offset-2">code goes here....</div></center>
</div>
</div>
  </body>
</html>

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).