<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ben Atkin&#039;s Self-Hosted Blog &#187; sinatra</title>
	<atom:link href="http://benatkin.com/tag/sinatra/feed/" rel="self" type="application/rss+xml" />
	<link>http://benatkin.com</link>
	<description>My true voice on the Internet.</description>
	<lastBuildDate>Wed, 23 May 2012 13:55:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>the one-line sinatra app</title>
		<link>http://benatkin.com/2009/05/03/the-one-line-sinatra-app/</link>
		<comments>http://benatkin.com/2009/05/03/the-one-line-sinatra-app/#comments</comments>
		<pubDate>Sun, 03 May 2009 17:23:56 +0000</pubDate>
		<dc:creator>Ben Atkin</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://benatkin.com/weblog/?p=324</guid>
		<description><![CDATA[The five-line sinatra app on http://www.sinatrarb.com/ is pretty damn impressive: require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end I can do four lines better than that, though: require 'sinatra' So what does that get you? batkin:cholla ben$ ruby &#8230; <a href="http://benatkin.com/2009/05/03/the-one-line-sinatra-app/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The five-line sinatra app on <a href="http://www.sinatrarb.com/">http://www.sinatrarb.com/</a> is pretty damn impressive:</p>
<pre class="prettyprint" style="border: none">require 'rubygems'
require 'sinatra'
get '/hi' do
  "Hello World!"
end</pre>
<p>I can do four lines better than that, though:</p>
<pre class="prettyprint" style="border: none">require 'sinatra'</pre>
<p>So what does that get you?</p>
<pre class="prettyprint" style="border: none">batkin:cholla ben$ ruby -rubygems cholla.rb
== Sinatra/0.9.0.4 has taken the stage on 4567 for development with backup from Thin
&gt;&gt; Thin web server (v1.0.0 codename That's What She Said)
&gt;&gt; Maximum connections set to 1024
&gt;&gt; Listening on 0.0.0.0:4567, CTRL+C to stop
127.0.0.1 - - [03/May/2009 10:13:46] "GET /index.html HTTP/1.1" 200 7 0.0019</pre>
<p><em>A basic http file server, perfect for working with plain html, javascript, and CSS!</em> Just create a <strong>public/</strong> directory alongside the one-line sinatra app, and have at it! If you create an <strong>index.html</strong> file in <strong>public/</strong>, it will be served up when you go to <a href="http://localhost:4567/">http://localhost:4567/</a>. Try it!</p>
<p>Once you decide to add some server-side code, you can simply go in to the sinatra app and add it.</p>
]]></content:encoded>
			<wfw:commentRss>http://benatkin.com/2009/05/03/the-one-line-sinatra-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

