I know that I can use ProxyPass to serve up my yardoc server instance but since yard uses Rack, shouldn’t it be possible to run yard via Passenger?
How would I go about setting this up? The Passenger Docs describe a public directory and a config.ru for Rack apps, but they’re not available in Yardoc’s source.
Yard does not provide a convenience Rack integration AFAIK, but it features a rack adapter that allows you to run it inside a Rack Server like Passenger.
You need to write your own
config.ruto configure Passenger to run a Yard Server using Yard’sRackAdapterclass. Also you need to tell Yard where it can find the documentation it should serve.I have not tested this, but here is a rough guess at what the
config.rushould look like:Where
mylibis the name of the library you want to serve.See here: