What happens when you visit http://localhost:8000 in the browser? Check out the diagram in the browser.
- The browser makes a request for the URL http://localhost:8000.
- The request hits the Rails router in config/routes.rb. The router recognizes the URL and sends the request to the controller.
- The controller receives the request and processes it.
- The controller passes the request to the view.
- The view renders the page as HTML.
- The controller sends the HTML back to the browser for you to see.
This is called the request/response cycle. It's a useful way to see how a Rails app's files and folders fit together.