Hanakai
  • Guides
  • Docs
  • Blog
  • Community
  • Conduct
  • Sponsor
  • Guides
  • Docs
  • Blog
  • Community
  • Conduct
  • Sponsor
v2.2 v2.1 v2.0
  1. Getting started
    1. Getting Started
    2. Building a web app
    3. Building an API
  2. Command line
    1. Commands
    2. New
    3. Install
    4. Console
    5. Server
    6. Dev
    7. Generate
    8. DB
    9. Routes
    10. Middleware
    11. Assets
    12. Version
  3. App
    1. Booting
    2. Container and components
    3. Providers
    4. Settings
    5. Autoloading
    6. Environments
    7. App config
    8. Inflector
    9. Code reloading
    10. Slices
  4. Database
    1. Overview
    2. Configuration
    3. Migrations
    4. Relations
  5. Routing
    1. Overview
  6. Actions
    1. Overview
    2. Parameters
    3. Rendering views
    4. Request and response
    5. Status Codes
    6. Rack integration
    7. Formats and MIME types
    8. Cookies
    9. Sessions
    10. Exception handling
    11. Control flow
    12. Inheritance
    13. HTTP Caching
    14. Testing
  7. Operations
    1. Overview
  8. Views
    1. Overview
    2. Working with dependencies
    3. Input and exposures
    4. Rendering from actions
    5. Templates and partials
    6. Helpers
    7. Context
    8. Parts
    9. Scopes
    10. Rendering errors
    11. Configuration
    12. Testing
  9. Helpers
    1. Overview
    2. String escaping
    3. HTML
    4. Assets
    5. Number formatting
  10. Logger
    1. Configuration
    2. Usage
  11. Assets
    1. Overview
    2. Using a CDN
    3. Customization
  12. Upgrade notes
    1. Upgrade to 2.2
    2. Upgrade to 2.1

On this page

  1. hanami routes
  1. Hanami
  2. Command line

Routes

hanami routes

Displays your application's routes.

$ bundle exec hanami routes

GET     /                             home.index                    as :root
GET     /books                        books.index
GET     /books/:id                    books.show
POST    /books                        books.create

By default, routes are displayed in "human friendly" format. Routes can be inspected in csv format via the format option:

$ bundle exec hanami routes --format=csv

METHOD,PATH,TO,AS,CONSTRAINTS
GET,/,home.index,:root,""
GET,/books,books.index,"",""
GET,/books/:id,books.show,"",""
POST,/books,books.create,"",""
  • Guides
    • Hanami
    • Dry
    • Rom
  • Docs
    • Hanami
    • Dry
    • Rom
  • Community
    • Code repository
    • Discussion forum
    • Chat room
  • Blog
  • Conduct
  • Sponsor