We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e50157d + 46a9a9a commit e74c2dbCopy full SHA for e74c2db
server.rb
@@ -11,7 +11,9 @@
11
require 'webrick'
12
require 'json'
13
14
-port = ENV['PORT'].nil? ? 3000 : ENV['PORT'].to_i
+# default port to 3000 or overwrite with PORT variable by running
15
+# $ PORT=3001 ruby server.rb
16
+port = ENV['PORT'] ? ENV['PORT'].to_i : 3000
17
18
puts "Server started: http://localhost:#{port}/"
19
0 commit comments