This Ruby on Rails app offers "hello world" as a service.
gem install bundler
bundle install
To start the server:
rails server
To test the server:
> ./test-curl-json.sh
{"message": "Good morning"}
More expected behavior (not implemented yet):
> ./test-curl.sh
<p>Hello, World</p>
- accept
GET
andPOST
requests - for
GET
request on/
:- no
Accept
header, expected response:<p>Hello, World</p>
-
Accept
header includesapplication/json
, expected response:{"message": "Good morning"}
- no
- command line scripts for testing - see
test-curl.sh
andtest-curl-json.sh
- include unit tests, like
rspec
Incredibly incomplete!