Module: Lively::Environments::Application

Defined in:
lib/lively/environments/application.rb

Class Method Summary collapse

Class Method Details

.load(configuration) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/lively/environments/application.rb', line 26

def self.load(configuration)
	configuration.load(:application)
	
	configuration.environment(:lively, :application) do
		# The middleware stack for the application.
		# @attribute [Protocol::HTTP::Middleware]
		middleware do
			::Protocol::HTTP::Middleware.build do |builder|
				builder.use Assets, root: File.expand_path('public', @root)
				builder.use Assets, root: File.expand_path('../../../public', __dir__)
				builder.use ::Application
			end
		end
	end
end