Skip to content

A bone simple 3-line HTTP server based on Rack. It echoes whatever is sent to it and may be used for mocking and debugging API requests and responses.

License

Notifications You must be signed in to change notification settings

alphabet/simplest_ruby_http_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

simplest_ruby_http_server

A three-line Ruby http server based on rack https://github.com/rack/rack.

gem install rack if you don't have it already and gem install rackup if you don't have it already.

  • Respond to any URI route.

To run the server, simply type rackup

To quit the server, press control-c

That's it!

To see the server in action, curl an HTTP request or point a browser at it curl -v http://localhost:9292/any/url/path/you/want

About

A bone simple 3-line HTTP server based on Rack. It echoes whatever is sent to it and may be used for mocking and debugging API requests and responses.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages