mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Add documentation for Rails/Sinatra/Rack usage
This commit is contained in:
parent
93e3499d60
commit
7a9a8e28aa
1 changed files with 35 additions and 0 deletions
35
README.md
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue