blob: 39487263dfd16ad87692148ab9b341af1ed36b0d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
# Allow the metal piece to run in isolation
require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails)
class <%= class_name %> < Rails::Rack::Metal
def call(env)
if env["PATH_INFO"] =~ /^\/<%= file_name %>/
[200, {"Content-Type" => "text/html"}, "Hello, World!"]
else
super
end
end
end
|