Project

spyder

0.0
A long-lived project that still receives updates
Spyder Web
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 1.0
 Project Readme

Gem Version

Easy web server

No magic, no DSL bs. Simple, explicit and lightweight.

server = Spyder::Server.new('0.0.0.0', 8080)

server.router.add_route 'GET', '/hello-world' do |request, _|
  which_world = request.query_params['world'] || 'Earth'

  resp = Spyder::Response.new
  resp.add_standard_headers
  resp.set_header 'content-type', 'text/plain'
  resp.body = "hello from #{which_world}!"

  resp
end

server.start