Skip to content

Commit fa0bf6b

Browse files
committed
Merge pull request reactjs#25 from leonidez/patch-1
2 parents 2327a52 + b093b34 commit fa0bf6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
require 'webrick'
1212
require 'json'
1313

14-
comments = react_version = JSON.parse(File.read('./_comments.json'))
15-
1614
puts 'Server started: http://localhost:3000/'
1715

1816
root = File.expand_path './public'
1917
server = WEBrick::HTTPServer.new :Port => 3000, :DocumentRoot => root
2018

2119
server.mount_proc '/comments.json' do |req, res|
20+
comments = react_version = JSON.parse(File.read('./_comments.json'))
21+
2222
if req.request_method == 'POST'
2323
# Assume it's well formed
2424
comments << req.query

0 commit comments

Comments
 (0)