Sha256: 2d91ba7a9f58ac2c3286829bf28e2d1d3717e933391acda2094579a3779f3384

Contents?: true

Size: 1.46 KB

Versions: 22

Compression:

Stored size: 1.46 KB

Contents

########################
# RackServer rack interface
#
# using Rack with Plezi poses some limitations...:
#
# 1. there is NO WebSockets support for Rack apps.
#
# 2. this might break any streaming / asynchronous methods calls, such as Iodine's Http streaming.
#
# 3. Plezi parameters and file uploads are different then Rack - HTML Form code might be incompatible!
#    This MIGHT BREAKE YOUR CODE! (changing this requires Plezi to re-parse the HTML, and costs in performance).
#
# also, all Plezi server specific configuration will be ignored.
#
# on the other hand, there is an upside:
#
# 1. you can choose a well tested server written in C that might (or might not) bring a performance boost.
#
# 2. you have better control over Middleware then you could have with Plezi.
# ("wait", you might say, "there is no Middleware in Plezi!"... "Ahhh", I will answer, "so much to discover...")
#
#
##############
#
# For now, Rack mode is NOT supported unless using the Iodine Http server,
# even than you're 404 not found pages will break unless using a catch-all route.

# load all framework and gems
load ::File.expand_path(File.join("..", "environment.rb"),  __FILE__)

# set up the routes
load ::File.expand_path(File.join("..", "routes.rb"),  __FILE__)

# start the plezi EM, to make sure that the plezi async code doesn't break.
if Rack::Handler.default == Iodine::Http::Rack
	run(Proc.new { [404, {}, ["not found"]] })
else
	raise "Unsupported Server - Plezi only runs using Iodine."
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
plezi-0.12.22 resources/config.ru
plezi-0.12.21 resources/config.ru
plezi-0.12.20 resources/config.ru
plezi-0.12.19 resources/config.ru
plezi-0.12.18 resources/config.ru
plezi-0.12.17 resources/config.ru
plezi-0.12.16 resources/config.ru
plezi-0.12.15 resources/config.ru
plezi-0.12.14 resources/config.ru
plezi-0.12.13 resources/config.ru
plezi-0.12.11 resources/config.ru
plezi-0.12.10 resources/config.ru
plezi-0.12.9 resources/config.ru
plezi-0.12.8 resources/config.ru
plezi-0.12.7 resources/config.ru
plezi-0.12.6 resources/config.ru
plezi-0.12.5 resources/config.ru
plezi-0.12.4 resources/config.ru
plezi-0.12.3 resources/config.ru
plezi-0.12.2 resources/config.ru