Sha256: 83e5db4f11bbeb58c20eb9cd43a7aab252cd1c2cc6d794ae15e45825aa074035

Contents?: true

Size: 376 Bytes

Versions: 2

Compression:

Stored size: 376 Bytes

Contents

require "dotenv/load"
require "bridgetown-plugin-nano/rack_middleware"
require_relative "./<%= folder_name %>/config/application"

if Dir.exist?("output")
  # Only use static middleware if the output folder exists:
  use BridgetownPluginNano::Middleware::Static, root: "output", urls: %w[/]
  use BridgetownPluginNano::Middleware::NotFound, "output/404.html"
end

run NanoAPI

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bridgetown-plugin-nano-0.2.1 lib/bridgetown-plugin-nano/templates/bridgetown_root/config.ru.tt
bridgetown-plugin-nano-0.2.0 lib/bridgetown-plugin-nano/templates/bridgetown_root/config.ru.tt