Skip to content

Commit

Permalink
Implement the second assignment in ruby
Browse files Browse the repository at this point in the history
[refs #efdf2821ab7f]
  • Loading branch information
jfahrer committed May 5, 2018
1 parent d5c65b0 commit 0faad16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions developing/examples/webapp/ruby/app.rb
Expand Up @@ -4,5 +4,12 @@
set :port, 9494

get '/' do
File.open('/tmp/requests.txt', 'a') do |file|
file.puts "IP: #{request.ip}"
file.puts "Hostname: #{Socket.gethostname}"
file.puts "Path: #{request.path}"
file.puts "Timestamp: #{Time.now}"
file.puts '------------'
end
'Hello World!'
end
2 changes: 1 addition & 1 deletion developing/examples/webapp/ruby/docker-compose.yml
Expand Up @@ -2,7 +2,7 @@ version: '3.3'

services:
app:
image: jfahrer/webapp-ruby:v1
image: jfahrer/webapp-ruby:v2
build:
context: .
volumes:
Expand Down

0 comments on commit 0faad16

Please sign in to comment.