forked from perplexes/m2r
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revise examples and provide starting guide.
- Loading branch information
1 parent
d7b41a9
commit adbc14e
Showing
6 changed files
with
91 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ spec/reports | |
test/tmp | ||
test/version_tmp | ||
tmp | ||
example/tmp | ||
example/config.sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
# An example of running Rack application. | ||
# | ||
# Running this example: | ||
# | ||
# bundle exec rackup -I../lib lobster.ru | ||
# | ||
# m2sh load -config mongrel2.conf | ||
# m2sh start -name main | ||
# | ||
# curl http://localhost:6767 | ||
|
||
require 'rack/lobster' | ||
$: << ::File.dirname(__FILE__) | ||
require 'rack_handler' | ||
require './rack_handler' | ||
|
||
use Rack::ShowExceptions | ||
puts "Lobster at http://localhost:6767/handlertest" | ||
Rack::Handler::Mongrel2.run Rack::Lobster.new | ||
Rack::Handler::Mongrel2.run Rack::Lobster.new | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
handler_test = Handler( | ||
send_spec = "tcp://127.0.0.1:9997", | ||
send_ident = "34f9ceee-cd52-4b7f-b197-88bf2f0ec378", | ||
recv_spec = "tcp://127.0.0.1:9996", | ||
recv_ident = "" | ||
) | ||
|
||
mongrel2 = Host( | ||
name = "127.0.0.1", | ||
routes = { "/": handler_test } | ||
) | ||
|
||
main = Server( | ||
uuid="2f62bd5-9e59-49cd-993c-3b6013c28f05", | ||
access_log = "/tmp/access.log", | ||
error_log = "/tmp/error.log", | ||
chroot = "./", | ||
pid_file = "/tmp/mongrel2.pid", | ||
default_host = "127.0.0.1", | ||
name = "main", | ||
port = 6767, | ||
hosts = [mongrel2] | ||
) | ||
|
||
servers = [main] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters