shard-kemal/samples/websocket_server.cr
2016-03-19 15:38:54 +02:00

11 lines
176 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
Kemal.run