The Message of The Day application is meant to illustrate how a web application can interact with files on the computer. The initial version has two features:
- Display the contents of message-of-the-day.txt
whenever a user visits
/message
. - Select one of the lines at random from quotes.txt whenever
a user visits
/quote
.
To install the libraries required for this application, first run the following command:
$ bundle install
Once you've installed the required libraries, run the following command:
$ ruby message_app.rb
To stop your application, press Ctrl+c
. That means press the "Control" key
and the "c" key at the same time.