Fast WebSocket and Http/Https server using an native extension with C API from uNetworking/uWebSockets
This Project will resume when socketify.py gets its v0.1.0 release!
require "socketify"
Socketify::App.new()
.get("/", lambda {|response, request| response.end("Hello World socketify from Ruby!")})
.listen(8082, lambda {|config| puts "Listening on port #{config.port}" })
.run()
gem 'socketify', git: 'https://github.com/cirospaciari/socketify.rb.git', branch: 'main', submodules: true
bundle exec ruby ./hello_world.rb
require "socketify"
Socketify::SSLApp.new({
key_file_name: "./misc/key.pem",
cert_file_name: "./misc/cert.pem",
passphrase: "1234"
})
.get("/", lambda {|response, request| response.end("Hello World socketify from Ruby!")})
.listen(8082, lambda {|config| puts "Listening on port #{config.port}" })
.run()
cd ./ext/socketify && ruby extconf.rb && make && cd ../../ && ruby -Ilib:ext -r socketify ./tests/hello_world.rb