kemal/samples/websocket_server.cr
2015-12-16 20:36:47 +02:00

9 lines
165 B
Crystal

require "kemal"
ws "/" do |socket|
socket.send "Hello from Kemal!"
socket.on_message do |message|
socket.send "Echo back from server #{message}"
end
end