Skip to content

Rails engine that adds a /routes route that will list all of the application's routes except for external redirects, generic HTTP status pages, and default Rails routes

License

Notifications You must be signed in to change notification settings

careerbuilder/routes-revealer

Repository files navigation

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!

About

Rails engine that adds a /routes route that will list all of the application's routes except for external redirects, generic HTTP status pages, and default Rails routes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •