postrank-labs/goliath

How to put static value into env?

larryzhao opened this issue · 1 comments

How should I put a static value like some path into env object in Goliath?

Like normally setting in Rack:

use Rack::Config do |env|
  env['my_path'] = '/path/to/view/root/directory'
end
dj2 commented

Put it in your config and you can access it from env.config. See the examples directory for usage of the config.