public
Description: A very fast & simple Ruby web server
Homepage: http://code.macournoyer.com/thin/
Clone URL: git://github.com/macournoyer/thin.git
Search Repo:
Add a example adapter.
macournoyer (author)
Tue Jan 22 06:32:26 -0800 2008
commit  90d02898c69e4ff2b673368c9d85f936be121507
tree    d14707f3d8eeeb6bfd9a5394c336a0899c039d71
parent  98d3e8f4e08e46f73bb2012b0869a819d1cb2a5f
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -0,0 +1,17 @@
0
+require 'rubygems'
0
+require 'thin'
0
+
0
+class SimpleAdapter
0
+ def call(env)
0
+ [
0
+ 200,
0
+ { 'Content-Type' => 'text/plain' },
0
+ ["hello!\n"]
0
+ ]
0
+ end
0
+end
0
+
0
+app = Rack::URLMap.new('/test' => SimpleAdapter.new,
0
+ '/files' => Rack::File.new('.'))
0
+
0
+Thin::Server.new('0.0.0.0', 3000, app).start!
0
\ No newline at end of file

Comments

    No one has commented yet.