Simple HTTP server with Ruby
Ruby standard library provides a simple HTTP server called WEBrick. It can be used to serve static files from a directory with one-line script:
ruby -run -e httpd
Where:
-run
stands forrequire 'un'
(un is a small utility library for common UNIX commands)-e httpd
means execute httpd method from theun
library
The httpd
will start WEBrick
server to simply serve files from a current directory.