0.03
Low commit activity in last 3 years
There's a lot of open issues
No release in over a year
A Rack compatible pure Ruby HTTP Server.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0

Runtime

~> 1.0
~> 0.0
 Project Readme

net-http-server

Description

{Net::HTTP::Server} is a pure Ruby HTTP server.

Features

  • Pure Ruby.
  • Supports Streamed Request/Response Bodies.
  • Supports Chunked Transfer-Encoding.
  • Provides a Rack Handler.

Examples

Simple HTTP Server:

require 'net/http/server'
require 'pp'

Net::HTTP::Server.run(:port => 8080) do |request,stream|
  pp request

  [200, {'Content-Type' => 'text/html'}, ['Hello World']]
end

Use it with Rack:

require 'rack/handler/http'

Rack::Handler::HTTP.run app

Using it with rackup:

$ rackup -s HTTP

Requirements

Install

$ gem install net-http-server

Copyright

Copyright (c) 2011-2022 Hal Brodigan

See {file:LICENSE.txt} for details.