Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1.44 KB

README.md

File metadata and controls

23 lines (16 loc) · 1.44 KB

Code ClimateTest CoverageGem Version

routes_revealer

The routes revealer is a simple engine that adds a url to your rails application that will list all of the defined routes within your application. This is especially useful if you are running in an environment where you have one website serviced by multiple backend applications.

Imagine a scenario where you have two rails applications. One is your main website and the other is a blog. You could deploy both these apps with the routes revealer gem and then setup nginx, haproxy or Netflix zuul to query these apps for their defined urls and route to the appropriate one. To your end-users it will appear as one unified website.

Installation

To install this engine follow these steps:

  1. Add the gem to your Gemfile gem 'routes_revealer'
  2. Add mount RoutesRevealer::Engine => '/' to config/routes.rb
  3. ???
  4. Profit!!

Use

Go to your application's URL at /routes and you should see all of your routes in json like so

["/assets","/","/home"]

Congratulations!