Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add documentation for Rails/Sinatra/Rack usage

  • Loading branch information...
commit 7a9a8e28aafc0654618f6da70d73efe158f8f0f9 1 parent 93e3499
@rkh rkh authored
Showing with 35 additions and 0 deletions.
  1. +35 −0 README.md
View
35 README.md
@@ -23,3 +23,38 @@ Now you should have the puma command available in your PATH, so just do the foll
## Install
$ gem install puma
+
+## Advanced Setup
+
+### Sinatra
+
+You can run your Sinatra application with Puma from the command line like this:
+
+ $ ruby app.rb -s Puma
+
+Or you can configure your application to always use Puma:
+
+ require 'sinatra'
+ configure { set :server, :puma }
+
+If you use Bundler, make sure you add Puma to your Gemfile (see below).
+
+### Rails
+
+First, make sure Puma is in your Gemfile:
+
+ gem 'puma'
+
+Then start your server with the `rails` command:
+
+ $ rails s puma
+
+### Rackup
+
+You can pass it as an option to `rackup`:
+
+ $ rackup -s puma
+
+Alternatively, you can modify your `config.ru` to choose Puma by default, by adding the following as the first line:
+
+ #\ -s puma
Please sign in to comment.
Something went wrong with that request. Please try again.