Skip to content

Commit

Permalink
my version in only one line
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelss committed Aug 30, 2010
1 parent 788939e commit 5360bbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions config.ru
@@ -1,5 +1 @@
run lambda { |env|
[200,
{'Content-Type' => 'text/html; charset=UTF-8'},
::File::open((env['REQUEST_URI'].include?('timer.js') ? 'timer.js' : 'test.html'))]
}
run Rack::File.new(".")
2 changes: 1 addition & 1 deletion test.html → index.html
Expand Up @@ -2,7 +2,7 @@
<html>
<head></head>
<body>
<script src="timer.js"></script>
<script src="/timer.js"></script>
<script>timer()</script>
</body>
<html>

0 comments on commit 5360bbc

Please sign in to comment.