Skip to content

thekuwayama/biryani

Repository files navigation

biryani

Gem Version Actions Status license

biryani is an HTTP/2 server implemented using Ruby Ractor.

Installation

The gem is available at rubygems.org. You can install it the following:

$ gem install biryani

Usage

This implementation intentionally provides a minimal API and delegates application-level responsibilities to your code. Roughly, it works as follows:

require 'socket' require 'biryani' port = ARGV[0] || 8888 socket = TCPServer.new(port) server = Biryani::Server.new( # @param _req [Biryani::HTTP::Request] # @param res [Biryani::HTTP::Response] Ractor.shareable_proc do |_req, res| res.status = 200 res.content = 'Hello, world!' end ) server.run(socket)
$ curl --http2-prior-knowledge http://localhost:8888 Hello, world!

License

biryani is available as open source under the terms of the MIT License.

About

An HTTP/2 server implemented using Ruby Ractor

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages