examples/http/http_server.rb in polyphony-0.16 vs examples/http/http_server.rb in polyphony-0.17
- old
+ new
@@ -2,10 +2,10 @@
require 'bundler/setup'
require 'polyphony/http'
opts = { reuse_addr: true, dont_linger: true }
-spawn {
+coproc {
Polyphony::HTTP::Server.serve('0.0.0.0', 1234, opts) do |req|
req.respond("Hello world!\n")
end
}
\ No newline at end of file