diff options
Diffstat (limited to 'railties/bin/server')
-rw-r--r-- | railties/bin/server | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/railties/bin/server b/railties/bin/server index 3a8cc68258..38f35c4285 100644 --- a/railties/bin/server +++ b/railties/bin/server @@ -4,12 +4,12 @@ require 'webrick' require 'optparse' OPTIONS = { - :port => 3000, - :ip => "0.0.0.0", - :environment => "development", - :server_root => File.expand_path(File.dirname(__FILE__) + "/../public/"), - :server_type => WEBrick::SimpleServer, - :charset => "UTF-8" + :port => 3000, + :ip => "0.0.0.0", + :environment => "development", + :server_root => File.expand_path(File.dirname(__FILE__) + "/../public/"), + :server_type => WEBrick::SimpleServer, + :charset => "UTF-8" } ARGV.options do |opts| @@ -27,6 +27,10 @@ ARGV.options do |opts| opts.on("-e", "--environment=name", String, "Specifies the environment to run this server under (test/development/production).", "Default: development") { |OPTIONS[:environment]| } + opts.on("-m", "--mime-types=filename", String, + "Specifies an Apache style mime.types configuration file to be used for mime types", + "Default: none") { |mime_types_file| OPTIONS[:mime_types] = WEBrick::HTTPUtils::load_mime_types(mime_types_file) } + opts.on("-d", "--daemon", "Make Rails run as a Daemon (only works if fork is available -- meaning on *nix)." ) { OPTIONS[:server_type] = WEBrick::Daemon } |