diff --git a/lib/lively/assets.rb b/lib/lively/assets.rb index c316e40..f990d80 100644 --- a/lib/lively/assets.rb +++ b/lib/lively/assets.rb @@ -17,7 +17,9 @@ class Assets < Protocol::HTTP::Middleware ".mp3" => "audio/mpeg", } - def initialize(delegate, root: Dir.pwd, content_types: DEFAULT_CONTENT_TYPES, cache_control: DEFAULT_CACHE_CONTROL) + PUBLIC_ROOT = File.expand_path('../../public', __dir__) + + def initialize(delegate, root: PUBLIC_ROOT, content_types: DEFAULT_CONTENT_TYPES, cache_control: DEFAULT_CACHE_CONTROL) super(delegate) @root = root