This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quine Eval Server - An experiment | |
# ================================= | |
# | |
# This server, when run, will accept POST requests on the root ('/') where the post body is ruby code to eval. | |
# This server also makes a copy of its source code, and includes the eval'd statements in the new source. | |
# Because this is a sinatra server, you can use this to create new routes and build up a web service incrementally while running. | |
# | |
# Example post to server using curl: | |
# curl -vv -XPOST -d 'get "/hi" do ; "hi!" ; end' 'http://localhost:4567' | |
# |